pgsql: If recovery_target_timeline is set to 'latest' and standby mode

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: If recovery_target_timeline is set to 'latest' and standby mode
Date: 2011-03-07 19:16:05
Message-ID: E1PwfuX-0004jN-5a@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

If recovery_target_timeline is set to 'latest' and standby mode is enabled,
periodically rescan the archive for new timelines, while waiting for new WAL
segments to arrive. This allows you to set up a standby server that follows
the TLI change if another standby server is promoted to master. Before this,
you had to restart the standby server to make it notice the new timeline.

This patch only scans the archive for TLI changes, it won't follow a TLI
change in streaming replication. That is much needed too, but it would be a
much bigger patch than I dare to sneak in this late in the release cycle.

There was discussion on improving the sanity checking of the WAL segments so
that the system would notice more reliably if the new timeline isn't an
ancestor of the current one, but that is not included in this patch.

Reviewed by Fujii Masao.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/1a4ab9ec23f0635a4c15b069df60b545814650e9

Modified Files
--------------
doc/src/sgml/high-availability.sgml | 5 ++-
doc/src/sgml/recovery-config.sgml | 4 +-
src/backend/access/transam/xlog.c | 79 +++++++++++++++++++++++++++++++++-
3 files changed, 83 insertions(+), 5 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Magnus Hagander 2011-03-07 19:20:58 Re: [COMMITTERS] pgsql: If recovery_target_timeline is set to 'latest' and standby mode
Previous Message Robert Haas 2011-03-07 18:58:28 pgsql: Reword alpha release note item on SSI.

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2011-03-07 19:16:55 Re: Tracking latest timeline in standby mode
Previous Message Josh Berkus 2011-03-07 19:12:34 Re: [DOCS] Sync rep doc corrections