Subject: purge [was: What is correct date output]

From: [email-masked] (Paul M. Aoki)
Date: Sat, 06 Nov 93 23:42:52 -0800

[email-masked] 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  |  [email-masked]
                |  Berkeley, CA 94720           |  ...!uunet!ucbvax!aoki