diff options
Diffstat (limited to 'src/include/access/transam.h')
-rw-r--r-- | src/include/access/transam.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/include/access/transam.h b/src/include/access/transam.h index bf52484cc43..e623c5d0006 100644 --- a/src/include/access/transam.h +++ b/src/include/access/transam.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/access/transam.h,v 1.51 2004/12/31 22:03:21 pgsql Exp $ + * $PostgreSQL: pgsql/src/include/access/transam.h,v 1.52 2005/02/20 02:22:03 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -75,13 +75,21 @@ /* * VariableCache is placed in shmem and used by - * backends to get next available XID & OID. + * backends to get next available OID & XID. + * + * Note: xidWrapLimit and limit_datname are not "active" values, but are + * used just to generate useful messages when xidWarnLimit or xidStopLimit + * are exceeded. */ typedef struct VariableCacheData { - TransactionId nextXid; /* next XID to assign */ Oid nextOid; /* next OID to assign */ uint32 oidCount; /* OIDs available before must do XLOG work */ + TransactionId nextXid; /* next XID to assign */ + TransactionId xidWarnLimit; /* start complaining here */ + TransactionId xidStopLimit; /* refuse to advance nextXid beyond here */ + TransactionId xidWrapLimit; /* where the world ends */ + NameData limit_datname; /* database that needs vacuumed first */ } VariableCacheData; typedef VariableCacheData *VariableCache; @@ -118,6 +126,8 @@ extern bool TransactionIdFollowsOrEquals(TransactionId id1, TransactionId id2); /* in transam/varsup.c */ extern TransactionId GetNewTransactionId(bool isSubXact); extern TransactionId ReadNewTransactionId(void); +extern void SetTransactionIdLimit(TransactionId oldest_datfrozenxid, + Name oldest_datname); extern Oid GetNewObjectId(void); extern void CheckMaxObjectId(Oid assigned_oid); |