From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Allow pg_rewind to use a standby server as the source system.
Date: Thu, 12 Nov 2020 12:55:04 +0000
Message-ID: <E1kdC80-0002eY-Ng@gemulon.postgresql.org> (raw)
Allow pg_rewind to use a standby server as the source system.
Using a hot standby server as the source has not been possible, because
pg_rewind creates a temporary table in the source system, to hold the
list of file ranges that need to be fetched. Refactor it to queue up the
file fetch requests in pg_rewind's memory, so that the temporary table
is no longer needed.
Also update the logic to compute 'minRecoveryPoint' correctly, when the
source is a standby server.
Reviewed-by: Kyotaro Horiguchi, Soumyadeep Chakraborty
Discussion: https://www.postgresql.org/message-id/0c5b3783-af52-3ee5-f8fa-6e794061f70d%40iki.fi
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/9c4f5192f69ed16c99e0d079f0b5faebd7bad212
Modified Files
--------------
doc/src/sgml/ref/pg_rewind.sgml | 2 +-
src/bin/pg_rewind/libpq_source.c | 287 +++++++++++++++++++++---------
src/bin/pg_rewind/pg_rewind.c | 97 ++++++++--
src/bin/pg_rewind/t/003_extrafiles.pl | 26 ++-
src/bin/pg_rewind/t/007_standby_source.pl | 174 ++++++++++++++++++
5 files changed, 481 insertions(+), 105 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: heikki.linnakangas@iki.fi
Subject: Re: pgsql: Allow pg_rewind to use a standby server as the source system.
In-Reply-To: <E1kdC80-0002eY-Ng@gemulon.postgresql.org>
References: <E1kdC80-0002eY-Ng@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox