Re: Bug#333854: pg_group file update problems - Mailing list pgsql-bugs

From Bruce Momjian
Subject Re: Bug#333854: pg_group file update problems
Date
Msg-id 200510141529.j9EFTUr28169@candle.pha.pa.us
Whole thread Raw
In response to Re: Bug#333854: pg_group file update problems  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Bug#333854: pg_group file update problems
Next
From: Tom Lane
Date:
Subject: Re: BUG #1963: SSL certificate permission check is too strict