Tom Lane wrote:
> Bruce Momjian <[email protected]> writes:
> > OK, updated patch.
>
> I was sort of hoping that you would make the comments agree with the
> code...
Oh, you really read those comments? Fixed and attached.
--
Bruce Momjian | http://candle.pha.pa.us
[email protected] | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
Index: src/backend/commands/user.c
===================================================================
RCS file: /cvsroot/pgsql/src/backend/commands/user.c,v
retrieving revision 1.147
diff -c -c -r1.147 user.c
*** src/backend/commands/user.c 31 Dec 2004 21:59:42 -0000 1.147
--- src/backend/commands/user.c 14 Oct 2005 21:18:42 -0000
***************
*** 174,184 ****
errmsg("could not write to temporary file
\"%s\": %m", tempname)));
/*
! * Read pg_group and write the file. Note we use SnapshotSelf to
! * ensure we see all effects of current transaction. (Perhaps could
! * do a CommandCounterIncrement beforehand, instead?)
*/
! scan = heap_beginscan(grel, SnapshotSelf, 0, NULL);
while ((tuple = heap_getnext(scan, ForwardScanDirection)) != NULL)
{
Datum datum,
--- 174,183 ----
errmsg("could not write to temporary file
\"%s\": %m", tempname)));
/*
! * Read pg_group and write the file
*/
! CommandCounterIncrement(); /* see our current changes */
! scan = heap_beginscan(grel, SnapshotNow, 0, NULL);
while ((tuple = heap_getnext(scan, ForwardScanDirection)) != NULL)
{
Datum datum,
***************
*** 321,331 ****
errmsg("could not write to temporary file
\"%s\": %m", tempname)));
/*
! * Read pg_shadow and write the file. Note we use SnapshotSelf to
! * ensure we see all effects of current transaction. (Perhaps could
! * do a CommandCounterIncrement beforehand, instead?)
*/
! scan = heap_beginscan(urel, SnapshotSelf, 0, NULL);
while ((tuple = heap_getnext(scan, ForwardScanDirection)) != NULL)
{
Datum datum;
--- 320,329 ----
errmsg("could not write to temporary file
\"%s\": %m", tempname)));
/*
! * Read pg_shadow and write the file
*/
! CommandCounterIncrement(); /* see our current changes */
! scan = heap_beginscan(urel, SnapshotNow, 0, NULL);
while ((tuple = heap_getnext(scan, ForwardScanDirection)) != NULL)
{
Datum datum;
***************
*** 781,786 ****
--- 779,785 ----
* Set flag to update flat password file at commit.
*/
user_file_update_needed();
+ group_file_update_needed();
}
***************
*** 1200,1205 ****
--- 1199,1205 ----
* Set flag to update flat password file at commit.
*/
user_file_update_needed();
+ group_file_update_needed();
}
***************
*** 1286,1291 ****
--- 1286,1292 ----
heap_close(rel, NoLock);
user_file_update_needed();
+ group_file_update_needed();
}
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend