summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2013-02-11 18:13:09 +0200
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2013-02-11 18:16:25 +0200
commit7803e9327db3788f68d820c19f4081afb79edd12 (patch)
tree8d9e4668125df8023c4a59e9060b19dcb5b940d6 /src/include
parentc352ea2d74c4e317bf2a1471ec1f750f9f072276 (diff)
Include previous TLI in end-of-recovery and shutdown checkpoint records.
This isn't used for anything but a sanity check at the moment, but it could be highly valuable for debugging purposes. It could also be used to recreate timeline history by traversing WAL, which seems useful.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/access/xlog_internal.h3
-rw-r--r--src/include/catalog/pg_control.h4
2 files changed, 5 insertions, 2 deletions
diff --git a/src/include/access/xlog_internal.h b/src/include/access/xlog_internal.h
index 34c659314ce..16b53e37260 100644
--- a/src/include/access/xlog_internal.h
+++ b/src/include/access/xlog_internal.h
@@ -221,7 +221,8 @@ typedef struct xl_restore_point
typedef struct xl_end_of_recovery
{
TimestampTz end_time;
- TimeLineID ThisTimeLineID;
+ TimeLineID ThisTimeLineID; /* new TLI */
+ TimeLineID PrevTimeLineID; /* previous TLI we forked off from */
} xl_end_of_recovery;
/*
diff --git a/src/include/catalog/pg_control.h b/src/include/catalog/pg_control.h
index ec8cea7c86e..0c647e77ad7 100644
--- a/src/include/catalog/pg_control.h
+++ b/src/include/catalog/pg_control.h
@@ -21,7 +21,7 @@
/* Version identifier for this pg_control format */
-#define PG_CONTROL_VERSION 933
+#define PG_CONTROL_VERSION 934
/*
* Body of CheckPoint XLOG records. This is declared here because we keep
@@ -33,6 +33,8 @@ typedef struct CheckPoint
XLogRecPtr redo; /* next RecPtr available when we began to
* create CheckPoint (i.e. REDO start point) */
TimeLineID ThisTimeLineID; /* current TLI */
+ TimeLineID PrevTimeLineID; /* previous TLI, if this record begins a new
+ * timeline (equals ThisTimeLineID otherwise) */
bool fullPageWrites; /* current full_page_writes */
uint32 nextXidEpoch; /* higher-order bits of nextXid */
TransactionId nextXid; /* next free XID */