Tom Lane wrote:
> Dennis Vshivkov <walrus@amur.ru> writes:
> > The problem is that the code that updates pg_group file resolves
> > group membership through the system user catalogue cache.
>
> Good catch.
>
> > The attached `98-6-pg_group-stale-data-fix.patch' makes the code
> > in question access the system user table directly and thus fixes
>
> Wouldn't a CommandCounterIncrement be a much simpler solution?
>
> Since this code is all gone in CVS tip, there's not going to be any way
> of beta-testing a large patch ... and there's also not going to be a lot
> of support for pushing a large, poorly tested patch into the back
> branches.
It is pretty clear where we are missing group_file_update_needed() in
user.c. We did not anticipate the group being modified by CREATE USER,
so adding the group_file_update_needed() seems trivial.
If a CommandCounterIncrement() fixes the problem, that also seems like a
trivial addition.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073