Peter Eisentraut <peter_e@gmx.net> writes:
> Now I do
> template1=> alter group one add user foo;
> NOTICE: Cannot add users to a group, yet.
> ALTER USER
> /* OK */
> template1=> alter group two add user foo;
> AlterGroup: Group "two" does not exist.
> /* Huh? */
I'll bet you forgot to update the indexes on pg_group. heap_insert is
not sufficient for a table that has indexes; you have to do a little
number that typically looks like (this example from the COMMENT code):
if (RelationGetForm(description)->relhasindex) { Relation idescs[Num_pg_description_indices];
CatalogOpenIndices(Num_pg_description_indices, Name_pg_description_indices, idescs);
CatalogIndexInsert(idescs,Num_pg_description_indices, description, desctuple);
CatalogCloseIndices(Num_pg_description_indices,idescs); }
> Also, why can pg_group not be vacuumed? (pg_shadow can.) With all this
> testing, mine is filling up.
> Perhaps related, but just out of curiosity: Why is pg_group a system
> relatation (pg_class.relkind='s')?
That seems wrong, wrong, wrong --- and it probably explains why VACUUM
won't touch it. 's' is for special relations not system relations, and
pg_group is not special. I'm surprised it works at all...
regards, tom lane