pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: pg_rewind: Fix thinko in parsing target WAL.
Date: Tue, 10 Nov 2020 17:26:20 +0000
Message-ID: <E1kcXPQ-00043L-Dd@gemulon.postgresql.org> (raw)

pg_rewind: Fix thinko in parsing target WAL.

It's entirely possible to see WAL for a relation that doesn't exist in
the target anymore. That happens when the relation was dropped later.
The refactoring in commit eb00f1d4b broke that case, by sanity-checking
the file type in the target before checking the flag forwhether it
exists there at all.

I noticed this during manual testing. Modify the 001_basic.pl test so
that it covers this case.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/72d172743e52f31bb874e3bbc07544b30bf0bb51

Modified Files
--------------
src/bin/pg_rewind/filemap.c      | 21 ++++++++++++---------
src/bin/pg_rewind/t/001_basic.pl |  1 +
2 files changed, 13 insertions(+), 9 deletions(-)



Message-ID: <E1kcXPQ-00043L-Dd@gemulon.postgresql.org>
Permalink:  ../E1kcXPQ-00043L-Dd@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1kcXPQ-00043L-Dd@gemulon.postgresql.org

 · 

reply

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: pg_rewind: Fix thinko in parsing target WAL.
  In-Reply-To: <E1kcXPQ-00043L-Dd@gemulon.postgresql.org>
  References: <E1kcXPQ-00043L-Dd@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