aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2012-12-04 11:24:28 +0200
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2012-12-04 11:31:00 +0200
commit5ce108bf320d23070c53d3437fd3dc799a97310c (patch)
treec151a71614a9c56edca50ae1b11d242d3e692fcb /src/include
parent2f227656076aded21673fe4b5a831fe28e76c785 (diff)
downloadpostgresql-5ce108bf320d23070c53d3437fd3dc799a97310c.tar.gz
postgresql-5ce108bf320d23070c53d3437fd3dc799a97310c.zip
Track the timeline associated with minRecoveryPoint, for more sanity checks.
This allows recovery to notice certain incorrect recovery scenarios. If a server has recovered to point X on timeline 5, and you restart recovery, it better be on timeline 5 when it reaches point X again, not on some timeline with a higher ID. This can happen e.g if you a standby server is shut down, a new timeline appears in the WAL archive, and the standby server is restarted. It will try to follow the new timeline, which is wrong because some WAL on the old timeline was already replayed before shutdown. Requires an initdb (or at least pg_resetxlog), because this adds a field to the control file.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/catalog/pg_control.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/catalog/pg_control.h b/src/include/catalog/pg_control.h
index c9ee80531c3..1408be9c3a1 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 931
+#define PG_CONTROL_VERSION 932
/*
* Body of CheckPoint XLOG records. This is declared here because we keep
@@ -153,6 +153,7 @@ typedef struct ControlFileData
* pg_start_backup() call, not accompanied by pg_stop_backup().
*/
XLogRecPtr minRecoveryPoint;
+ TimeLineID minRecoveryPointTLI;
XLogRecPtr backupStartPoint;
XLogRecPtr backupEndPoint;
bool backupEndRequired;