pg_rewind: Fix thinko in parsing target WAL.

Heikki Linnakangas <heikki.linnakangas@iki.fi>

Commit: 72d172743e52f31bb874e3bbc07544b30bf0bb51
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: 2020-11-10T17:25:46Z
Releases: 14.0
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.

Files

PathChange+/−
src/bin/pg_rewind/filemap.c modified +12 −9
src/bin/pg_rewind/t/001_basic.pl modified +1 −0