pgsql: Use pg_rewind when target timeline was switched

From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Use pg_rewind when target timeline was switched
Date: 2015-12-01 15:56:58
Message-ID: E1a3nIY-0001Q9-5S@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Use pg_rewind when target timeline was switched

Allow pg_rewind to work when target timeline was switched. Now
user can return promoted standby to old master.

Target timeline history becomes a global variable. Index
in target timeline history is used in function interfaces instead of
specifying TLI directly. Thus, SimpleXLogPageRead() can easily start
reading XLOGs from next timeline when current timeline ends.

Author: Alexander Korotkov
Review: Michael Paquier

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/e50cda78404d6400b1326a996a4fabb144871151

Modified Files
--------------
doc/src/sgml/ref/pg_rewind.sgml | 18 ++--
src/bin/pg_rewind/Makefile | 2 +-
src/bin/pg_rewind/parsexlog.c | 39 +++++---
src/bin/pg_rewind/pg_rewind.c | 189 ++++++++++++++++++++++++++++-----------
src/bin/pg_rewind/pg_rewind.h | 10 ++-
5 files changed, 181 insertions(+), 77 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2015-12-01 16:07:45 pgsql: Further adjustment to psql's print_aligned_vertical() function.
Previous Message Tom Lane 2015-11-30 22:53:40 pgsql: Rework wrap-width calculation in psql's print_aligned_vertical()