diff options
Diffstat (limited to 'src/backend/commands/user.c')
-rw-r--r-- | src/backend/commands/user.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c index ff4f33b0739..c69956d41c9 100644 --- a/src/backend/commands/user.c +++ b/src/backend/commands/user.c @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/backend/commands/user.c,v 1.147 2004/12/31 21:59:42 pgsql Exp $ + * $PostgreSQL: pgsql/src/backend/commands/user.c,v 1.147.4.1 2005/10/26 13:43:28 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -174,11 +174,10 @@ write_group_file(Relation grel) 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?) + * Read pg_group and write the file */ - scan = heap_beginscan(grel, SnapshotSelf, 0, NULL); + CommandCounterIncrement(); /* see our current changes */ + scan = heap_beginscan(grel, SnapshotNow, 0, NULL); while ((tuple = heap_getnext(scan, ForwardScanDirection)) != NULL) { Datum datum, @@ -321,11 +320,10 @@ write_user_file(Relation urel) 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?) + * Read pg_shadow and write the file */ - scan = heap_beginscan(urel, SnapshotSelf, 0, NULL); + CommandCounterIncrement(); /* see our current changes */ + scan = heap_beginscan(urel, SnapshotNow, 0, NULL); while ((tuple = heap_getnext(scan, ForwardScanDirection)) != NULL) { Datum datum; @@ -781,6 +779,7 @@ CreateUser(CreateUserStmt *stmt) * Set flag to update flat password file at commit. */ user_file_update_needed(); + group_file_update_needed(); } @@ -1200,6 +1199,7 @@ DropUser(DropUserStmt *stmt) * Set flag to update flat password file at commit. */ user_file_update_needed(); + group_file_update_needed(); } @@ -1286,6 +1286,7 @@ RenameUser(const char *oldname, const char *newname) heap_close(rel, NoLock); user_file_update_needed(); + group_file_update_needed(); } |