diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2006-08-21 16:16:31 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2006-08-21 16:16:31 +0000 |
| commit | 35af5422f640e74029a167d106604da35ae64c5f (patch) | |
| tree | 88297ff1c3c369c1a2a2063b319518b0db72b4fe /src/include/catalog/pg_control.h | |
| parent | 1054c38069359239d4c1469a1dab543f11706bc2 (diff) | |
| download | postgresql-35af5422f640e74029a167d106604da35ae64c5f.tar.gz | |
Make the server track an 'XID epoch', that is, maintain higher-order bits
of the transaction ID counter. Nothing is done with the epoch except to
store it in checkpoint records, but this provides a foundation with which
add-on code can pretend that XIDs never wrap around. This is a severely
trimmed and rewritten version of the xxid patch submitted by Marko Kreen.
Per discussion, the epoch counter seems the only part of xxid that really
needs to be in the core server.
Diffstat (limited to 'src/include/catalog/pg_control.h')
| -rw-r--r-- | src/include/catalog/pg_control.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/include/catalog/pg_control.h b/src/include/catalog/pg_control.h index 8e405f607e..2b109f2d5a 100644 --- a/src/include/catalog/pg_control.h +++ b/src/include/catalog/pg_control.h @@ -8,7 +8,7 @@ * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/catalog/pg_control.h,v 1.31 2006/08/07 16:57:57 tgl Exp $ + * $PostgreSQL: pgsql/src/include/catalog/pg_control.h,v 1.32 2006/08/21 16:16:31 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -22,7 +22,7 @@ /* Version identifier for this pg_control format */ -#define PG_CONTROL_VERSION 821 +#define PG_CONTROL_VERSION 822 /* * Body of CheckPoint XLOG records. This is declared here because we keep @@ -36,6 +36,7 @@ typedef struct CheckPoint * transaction when we started (i.e. UNDO end * point) */ TimeLineID ThisTimeLineID; /* current TLI */ + uint32 nextXidEpoch; /* higher-order bits of nextXid */ TransactionId nextXid; /* next free XID */ Oid nextOid; /* next free OID */ MultiXactId nextMulti; /* next free MultiXactId */ |
