From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix pg_rewind bugs when rewinding a standby server.
Date: Thu, 03 Dec 2020 14:08:46 +0000
Message-ID: <E1kkpHq-0002bR-NM@gemulon.postgresql.org> (raw)
Fix pg_rewind bugs when rewinding a standby server.
If the target is a standby server, its WAL doesn't end at the last
checkpoint record, but at minRecoveryPoint. We must scan all the
WAL from the last common checkpoint all the way up to minRecoveryPoint
for modified pages, and also consider that portion when determining
whether the server needs rewinding.
Backpatch to all supported versions.
Author: Ian Barwick and me
Discussion: https://www.postgresql.org/message-id/CABvVfJU-LDWvoz4-Yow3Ay5LZYTuPD7eSjjE4kGyNZpXC6FrVQ%40mail.gma...
Branch
------
REL9_6_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/0740857de7804609783eb9f11f055776c1fff4e8
Modified Files
--------------
src/bin/pg_rewind/parsexlog.c | 11 +-
src/bin/pg_rewind/pg_rewind.c | 56 +++++----
src/bin/pg_rewind/t/008_min_recovery_point.pl | 165 ++++++++++++++++++++++++++
3 files changed, 209 insertions(+), 23 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: Fix pg_rewind bugs when rewinding a standby server.
In-Reply-To: <E1kkpHq-0002bR-NM@gemulon.postgresql.org>
References: <E1kkpHq-0002bR-NM@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