Re: Bug#333854: pg_group file update problems

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Dennis Vshivkov <walrus(at)amur(dot)ru>, 333854(at)bugs(dot)debian(dot)org, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Bug#333854: pg_group file update problems
Date: 2005-10-14 15:29:30
Message-ID: 200510141529.j9EFTUr28169@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-patches

Tom Lane wrote:
> Dennis Vshivkov <walrus(at)amur(dot)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(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2005-10-14 15:38:38 Re: BUG #1963: SSL certificate permission check is too strict
Previous Message Karl O. Pinc 2005-10-14 15:24:28 Re: BUG #1956: Plpgsql top-level DECLARE does not share

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2005-10-14 15:44:32 Re: [BUGS] Bug#333854: pg_group file update problems
Previous Message Tom Lane 2005-10-14 15:23:56 Re: Bug#333854: pg_group file update problems