diff options
Diffstat (limited to 'src/backend/access/transam')
-rw-r--r-- | src/backend/access/transam/twophase.c | 14 | ||||
-rw-r--r-- | src/backend/access/transam/xact.c | 12 |
2 files changed, 14 insertions, 12 deletions
diff --git a/src/backend/access/transam/twophase.c b/src/backend/access/transam/twophase.c index 7c8102d87c9..ccd8b802157 100644 --- a/src/backend/access/transam/twophase.c +++ b/src/backend/access/transam/twophase.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/access/transam/twophase.c,v 1.6 2005/06/19 22:34:56 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/access/transam/twophase.c,v 1.7 2005/06/28 05:08:51 tgl Exp $ * * NOTES * Each global transaction is associated with a global transaction @@ -107,7 +107,7 @@ typedef struct GlobalTransactionData PGPROC proc; /* dummy proc */ TimestampTz prepared_at; /* time of preparation */ XLogRecPtr prepare_lsn; /* XLOG offset of prepare record */ - AclId owner; /* ID of user that executed the xact */ + Oid owner; /* ID of user that executed the xact */ TransactionId locking_xid; /* top-level XID of backend working on xact */ bool valid; /* TRUE if fully prepared */ char gid[GIDSIZE]; /* The GID assigned to the prepared xact */ @@ -206,7 +206,7 @@ TwoPhaseShmemInit(void) */ GlobalTransaction MarkAsPreparing(TransactionId xid, const char *gid, - TimestampTz prepared_at, AclId owner, Oid databaseid) + TimestampTz prepared_at, Oid owner, Oid databaseid) { GlobalTransaction gxact; int i; @@ -350,7 +350,7 @@ MarkAsPrepared(GlobalTransaction gxact) * Locate the prepared transaction and mark it busy for COMMIT or PREPARE. */ static GlobalTransaction -LockGXact(const char *gid, AclId user) +LockGXact(const char *gid, Oid user) { int i; @@ -559,7 +559,7 @@ pg_prepared_xact(PG_FUNCTION_ARGS) TupleDescInitEntry(tupdesc, (AttrNumber) 3, "prepared", TIMESTAMPTZOID, -1, 0); TupleDescInitEntry(tupdesc, (AttrNumber) 4, "ownerid", - INT4OID, -1, 0); + OIDOID, -1, 0); TupleDescInitEntry(tupdesc, (AttrNumber) 5, "dbid", OIDOID, -1, 0); @@ -601,7 +601,7 @@ pg_prepared_xact(PG_FUNCTION_ARGS) values[0] = TransactionIdGetDatum(gxact->proc.xid); values[1] = DirectFunctionCall1(textin, CStringGetDatum(gxact->gid)); values[2] = TimestampTzGetDatum(gxact->prepared_at); - values[3] = Int32GetDatum(gxact->owner); + values[3] = ObjectIdGetDatum(gxact->owner); values[4] = ObjectIdGetDatum(gxact->proc.databaseId); tuple = heap_form_tuple(funcctx->tuple_desc, values, nulls); @@ -690,7 +690,7 @@ typedef struct TwoPhaseFileHeader TransactionId xid; /* original transaction XID */ Oid database; /* OID of database it was in */ TimestampTz prepared_at; /* time of preparation */ - AclId owner; /* user running the transaction */ + Oid owner; /* user running the transaction */ int32 nsubxacts; /* number of following subxact XIDs */ int32 ncommitrels; /* number of delete-on-commit rels */ int32 nabortrels; /* number of delete-on-abort rels */ diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c index 98e56c40020..a5d53d3e145 100644 --- a/src/backend/access/transam/xact.c +++ b/src/backend/access/transam/xact.c @@ -10,7 +10,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.207 2005/06/19 20:00:38 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.208 2005/06/28 05:08:51 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -121,7 +121,7 @@ typedef struct TransactionStateData * context */ ResourceOwner curTransactionOwner; /* my query resources */ List *childXids; /* subcommitted child XIDs */ - AclId currentUser; /* subxact start current_user */ + Oid currentUser; /* subxact start current_user */ bool prevXactReadOnly; /* entry-time xact r/o state */ struct TransactionStateData *parent; /* back link to parent */ } TransactionStateData; @@ -1488,8 +1488,10 @@ CommitTransaction(void) /* NOTIFY commit must come before lower-level cleanup */ AtCommit_Notify(); - /* Update flat files if we changed pg_database, pg_shadow or pg_group */ - /* This should be the last step before commit */ + /* + * Update flat files if we changed pg_database, pg_authid or + * pg_auth_members. This should be the last step before commit. + */ AtEOXact_UpdateFlatFiles(true); /* Prevent cancel/die interrupt while cleaning up */ @@ -3847,7 +3849,7 @@ PushTransaction(void) { TransactionState p = CurrentTransactionState; TransactionState s; - AclId currentUser; + Oid currentUser; /* * At present, GetUserId cannot fail, but let's not assume that. Get |