Return-Path: owner-postman
Received: from localhost (localhost [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.3/8.6.3) with SMTP id XAA29452 for postgres-dist; Sat, 6 Nov 1993 23:42:54 -0800
Resent-From: POSTGRES mailing list <postman@postgres.Berkeley.EDU>
Resent-Message-Id: <199311070742.XAA29452@nobozo.CS.Berkeley.EDU>
Sender: owner-postman@postgres.Berkeley.EDU
X-Return-Path: owner-postman
Received: from localhost (localhost [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.3/8.6.3) with SMTP id XAA29443; Sat, 6 Nov 1993 23:42:52 -0800
Message-Id: <199311070742.XAA29443@nobozo.CS.Berkeley.EDU>
X-Authentication-Warning: nobozo.CS.Berkeley.EDU: Host localhost didn't use HELO protocol
From: aoki@postgres.Berkeley.EDU (Paul M. Aoki)
To: witr@rwwa.COM
Cc: postgres@postgres.Berkeley.EDU
Subject: purge [was: What is correct date output]
In-reply-to: Your message of Wed, 3 Nov 93 14:46:14 -0500 
	     <9311031946.AB09312@relay1.UU.NET> 
Date: Sat, 06 Nov 93 23:42:52 -0800
X-Sender: aoki@postgres.Berkeley.EDU
Resent-To: postgres-dist@postgres.Berkeley.EDU
X-Mts: smtp
Resent-Date: Sat, 06 Nov 93 23:42:54 -0800
Resent-XMts: smtp

witr@rwwa.COM writes:
> On another note, can you offer any suggestions about purge?

one problem with purge is that these lines were omitted  --
they should immediately follow the heap_replace in purge.c:

        /* keep the system catalog indices current */
        CatalogOpenIndices(Num_pg_class_indices, Name_pg_class_indices, idescs);
        CatalogIndexInsert(idescs, Num_pg_class_indices, relation, newTuple);
        CatalogCloseIndices(Num_pg_class_indices, idescs);

otherwise the updated pg_class tuple cannot be seen by the
system internals, effectively deleting your class without 
deleting enough of it to let you redefine it.

oh yeah, and for this to compile you need to declare this in 
the same routine, RelationPurge:

        Relation                idescs[Num_pg_class_indices];

purge on pg_class, pg_am, pg_amop and pg_attribute will not work
at all.  you hit a circularity in the system catalog code.  in
theory there is an easy way to fix this but it didn't work the 
first time i tried it .. for now don't do it.  (i'm not going
to expend a lot of cycles on that.)

i'd send a patch but the time code has been so heavily hacked
that i'd have to just send you a new tar file :-)
--
  Paul M. Aoki  |  CS Div., Dept. of EECS, UCB  |  aoki@postgres.Berkeley.EDU
                |  Berkeley, CA 94720           |  ...!uunet!ucbvax!aoki
