Use pg_rewind when target timeline was switched

Teodor Sigaev <teodor@sigaev.ru>

Commit: e50cda78404d6400b1326a996a4fabb144871151
Author: Teodor Sigaev <teodor@sigaev.ru>
Date: 2015-12-01T15:56:44Z
Releases: 9.6.0
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

Files

PathChange+/−
doc/src/sgml/ref/pg_rewind.sgml modified +11 −7
src/bin/pg_rewind/Makefile modified +1 −1
src/bin/pg_rewind/parsexlog.c modified +27 −12
src/bin/pg_rewind/pg_rewind.c modified +135 −54
src/bin/pg_rewind/pg_rewind.h modified +7 −3

Documentation touched