Skip site navigation (1) Skip section navigation (2)

pgsql: If recovery_target_timeline is set to 'latest' and standbymode

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 standbymode
Date: 2011-03-07 19:16:05
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-committerspgsql-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.



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(-)


pgsql-hackers by date

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

pgsql-committers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group