From c402b087915a88948e3cfd8b6e4bf264e52d8c06 Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Thu, 31 Jan 2019 12:25:58 +0900 Subject: [PATCH] doc: update "node rejoin" page Add some notes about situations where node rejoin cannot work, and pg_rewind usage. --- doc/repmgr-node-rejoin.sgml | 40 +++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/doc/repmgr-node-rejoin.sgml b/doc/repmgr-node-rejoin.sgml index b4799a75..4c231acd 100644 --- a/doc/repmgr-node-rejoin.sgml +++ b/doc/repmgr-node-rejoin.sgml @@ -248,7 +248,7 @@ We strongly recommend familiarizing yourself with pg_rewind before attempting to use it with &repmgr;, as while it is an extremely useful tool, it is not - a "magic bullet". + a "magic bullet" which can resolve all problematic replication situations. @@ -315,8 +315,9 @@ If is used with the option, this checks the prerequisites for using pg_rewind, but is not an absolute guarantee that actually executing pg_rewind - will succeed. + will succeed. See also section below. + @@ -335,6 +336,41 @@ + + + + repmgr node rejoin + caveats + + + Caveats when using <command>repmgr node rejoin</command> + + repmgr node rejoin attempts to determine whether it will succeed by + comparing the timelines and relative WAL positions of the local node (rejoin candidate) and primary + (rejoin target). This is particularly important if planning to use pg_rewind, + which currently (as of PostgreSQL 11) may appear to succeed (or indicate there is no action + needed) but potentially allow an impossible action, such as trying to rejoin a standby to a + primary which is behind the standby. &repmgr; will prevent this situation from occurring. + + + Currently it is not possible to detect a situation where the rejoin target + is a standby which has been "promoted" by removing recovery.conf + (PostgreSQL 12 and later: standby.signal) and restarting it. + In this case there will be no information about the point the rejoin target diverged + from the current standby; the rejoin operation will fail and + the current standby's PostgreSQL log will contain entries with the text + "record with incorrect prev-link". + + + We strongly recommend running repmgr node rejoin with the + option first. Additionally it might be a good idea + to execute the pg_rewind command displayed by + &repmgr; with the pg_rewind + option. Note that pg_rewind does not indicate that it + is running in mode. + + + See also