pgsql: Fix pg_rewind bugs when rewinding a standby server. - Mailing list pgsql-committers

From Heikki Linnakangas
Subject pgsql: Fix pg_rewind bugs when rewinding a standby server.
Date
Msg-id E1kkpHq-0002bL-MC@gemulon.postgresql.org
Whole thread Raw
List 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
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/020f153dbb48519ebb9780ddbfe87b0532324d49

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(-)


pgsql-committers by date:

Previous
From: Peter Eisentraut
Date:
Subject: pgsql: Small code simplifications
Next
From: Bruce Momjian
Date:
Subject: pgsql: docs: list single-letter options first in command-line summary