pgsql: Fix pg_rewind bugs when rewinding a standby server.

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix pg_rewind bugs when rewinding a standby server.
Date: 2020-12-03 14:08:46
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/2b4f3130382fe2f8705863e4d38589d4d69cd695

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 | 156 ++++++++++++++++++++++++++
3 files changed, 200 insertions(+), 23 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2020-12-03 15:29:27 pgsql: docs: list single-letter options first in command-line summary
Previous Message Peter Eisentraut 2020-12-03 10:56:00 pgsql: Small code simplifications