diff options
| author | Tom Lane | 2005-02-20 02:22:07 +0000 |
|---|---|---|
| committer | Tom Lane | 2005-02-20 02:22:07 +0000 |
| commit | 60b2444cc3ba037630c9b940c3c9ef01b954b87b (patch) | |
| tree | 801836d707d7b2af3367b9a4fa768a44d2530a1e /src/include/commands | |
| parent | 617d16f4ff4959b1615cc9f57e271629c000ccff (diff) | |
Add code to prevent transaction ID wraparound by enforcing a safe limit
in GetNewTransactionId(). Since the limit value has to be computed
before we run any real transactions, this requires adding code to database
startup to scan pg_database and determine the oldest datfrozenxid.
This can conveniently be combined with the first stage of an attack on
the problem that the 'flat file' copies of pg_shadow and pg_group are
not properly updated during WAL recovery. The code I've added to
startup resides in a new file src/backend/utils/init/flatfiles.c, and
it is responsible for rewriting the flat files as well as initializing
the XID wraparound limit value. This will eventually allow us to get
rid of GetRawDatabaseInfo too, but we'll need an initdb so we can add
a trigger to pg_database.
Diffstat (limited to 'src/include/commands')
| -rw-r--r-- | src/include/commands/user.h | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/include/commands/user.h b/src/include/commands/user.h index 882b0efc219..a37f94940a9 100644 --- a/src/include/commands/user.h +++ b/src/include/commands/user.h @@ -4,20 +4,16 @@ * Commands for manipulating users and groups. * * - * $PostgreSQL: pgsql/src/include/commands/user.h,v 1.25 2004/09/16 16:58:39 tgl Exp $ + * $PostgreSQL: pgsql/src/include/commands/user.h,v 1.26 2005/02/20 02:22:05 tgl Exp $ * *------------------------------------------------------------------------- */ #ifndef USER_H #define USER_H -#include "fmgr.h" #include "nodes/parsenodes.h" -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); @@ -29,11 +25,4 @@ extern void AlterGroup(AlterGroupStmt *stmt, const char *tag); extern void DropGroup(DropGroupStmt *stmt); extern void RenameGroup(const char *oldname, const char *newname); -extern Datum update_pg_pwd_and_pg_group(PG_FUNCTION_ARGS); - -extern void AtEOXact_UpdatePasswordFile(bool isCommit); -extern void AtEOSubXact_UpdatePasswordFile(bool isCommit, - SubTransactionId mySubid, - SubTransactionId parentSubid); - #endif /* USER_H */ |
