pgsql: Track the timeline associated with minRecoveryPoint, for more sa

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Track the timeline associated with minRecoveryPoint, for more sa
Date: 2012-12-04 09:34:29
Message-ID: E1TfotZ-0003oP-IZ@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/5ce108bf320d23070c53d3437fd3dc799a97310c

Modified Files
--------------
src/backend/access/transam/xlog.c | 65 +++++++++++++++++++++++++++++-
src/bin/pg_controldata/pg_controldata.c | 4 +-
src/bin/pg_resetxlog/pg_resetxlog.c | 1 +
src/include/catalog/pg_control.h | 3 +-
4 files changed, 68 insertions(+), 5 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2012-12-04 11:43:00 pgsql: Fix build of LDAP URL feature
Previous Message Bruce Momjian 2012-12-04 05:04:25 Re: pgsql: Add support for LDAP URLs