1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-24 01:29:19 +03:00

Make CREATE/ALTER/DROP USER/GROUP transaction-safe, or at least pretty

nearly so, by postponing write of flat password file until transaction
commit.
This commit is contained in:
Tom Lane
2002-10-21 19:46:45 +00:00
parent de9d7f4bd5
commit e16f04cf72
3 changed files with 169 additions and 83 deletions

View File

@@ -1,9 +1,10 @@
/*-------------------------------------------------------------------------
*
* user.h
* Commands for manipulating users and groups.
*
*
* $Id: user.h,v 1.19 2002/09/04 20:31:42 momjian Exp $
* $Id: user.h,v 1.20 2002/10/21 19:46:45 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -13,13 +14,10 @@
#include "fmgr.h"
#include "nodes/parsenodes.h"
#define PWD_FILE "pg_pwd"
#define USER_GROUP_FILE "pg_group"
extern char *group_getfilename(void);
extern char *user_getfilename(void);
extern void CreateUser(CreateUserStmt *stmt);
extern void AlterUser(AlterUserStmt *stmt);
extern void AlterUserSet(AlterUserSetStmt *stmt);
@@ -31,4 +29,6 @@ extern void DropGroup(DropGroupStmt *stmt);
extern Datum update_pg_pwd_and_pg_group(PG_FUNCTION_ARGS);
extern void AtEOXact_UpdatePasswordFile(bool isCommit);
#endif /* USER_H */