diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2004-07-21 22:31:26 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2004-07-21 22:31:26 +0000 |
| commit | 2042b3428d3947987b27dbd4598fd9a5716ec9e8 (patch) | |
| tree | 99ba34f4b04e8e951dca70c31ab4edcdd3985e62 /src/include/access/xlogdefs.h | |
| parent | 8d3517dc1f9383d606bd8e50a9b58e732322fffd (diff) | |
| download | postgresql-2042b3428d3947987b27dbd4598fd9a5716ec9e8.tar.gz | |
Invent WAL timelines, as per recent discussion, to make point-in-time
recovery more manageable. Also, undo recent change to add FILE_HEADER
and WASTED_SPACE records to XLOG; instead make the XLOG page header
variable-size with extra fields in the first page of an XLOG file.
This should fix the boundary-case bugs observed by Mark Kirkwood.
initdb forced due to change of XLOG representation.
Diffstat (limited to 'src/include/access/xlogdefs.h')
| -rw-r--r-- | src/include/access/xlogdefs.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/include/access/xlogdefs.h b/src/include/access/xlogdefs.h index 057236e4ed..4507723e5a 100644 --- a/src/include/access/xlogdefs.h +++ b/src/include/access/xlogdefs.h @@ -2,12 +2,12 @@ * xlogdefs.h * * Postgres transaction log manager record pointer and - * system startup number definitions + * timeline number definitions * * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/access/xlogdefs.h,v 1.11 2003/12/20 17:31:21 momjian Exp $ + * $PostgreSQL: pgsql/src/include/access/xlogdefs.h,v 1.12 2004/07/21 22:31:25 tgl Exp $ */ #ifndef XLOG_DEFS_H #define XLOG_DEFS_H @@ -33,12 +33,6 @@ typedef struct XLogRecPtr uint32 xrecoff; /* byte offset of location in log file */ } XLogRecPtr; -typedef struct XLogwrtResult -{ - XLogRecPtr Write; /* last byte + 1 written out */ - XLogRecPtr Flush; /* last byte + 1 flushed */ -} XLogwrtResult; - /* * Macros for comparing XLogRecPtrs @@ -57,10 +51,16 @@ typedef struct XLogwrtResult #define XLByteEQ(a, b) \ ((a).xlogid == (b).xlogid && (a).xrecoff == (b).xrecoff) + /* - * StartUpID (SUI) - system startups counter. It's to allow removing - * pg_clog after shutdown, in future. + * TimeLineID (TLI) - identifies different database histories to prevent + * confusion after restoring a prior state of a database installation. + * TLI does not change in a normal stop/restart of the database (including + * crash-and-recover cases); but we must assign a new TLI after doing + * a recovery to a prior state, a/k/a point-in-time recovery. This makes + * the new WAL logfile sequence we generate distinguishable from the + * sequence that was generated in the previous incarnation. */ -typedef uint32 StartUpID; +typedef uint32 TimeLineID; #endif /* XLOG_DEFS_H */ |
