diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2020-11-10 19:25:46 +0200 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2020-11-10 19:25:46 +0200 |
commit | 72d172743e52f31bb874e3bbc07544b30bf0bb51 (patch) | |
tree | 3775ed25be95e098292081c60623171c64e946fc /src/bin/pg_rewind/t/001_basic.pl | |
parent | 3f16cb505d1d734674da2a2cbf2104ceae22f9b4 (diff) | |
download | postgresql-72d172743e52f31bb874e3bbc07544b30bf0bb51.tar.gz |
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.
Diffstat (limited to 'src/bin/pg_rewind/t/001_basic.pl')
-rw-r--r-- | src/bin/pg_rewind/t/001_basic.pl | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bin/pg_rewind/t/001_basic.pl b/src/bin/pg_rewind/t/001_basic.pl index ba528e262f..93fa09467b 100644 --- a/src/bin/pg_rewind/t/001_basic.pl +++ b/src/bin/pg_rewind/t/001_basic.pl @@ -71,6 +71,7 @@ sub run_test primary_psql("VACUUM tail_tbl"); # Drop drop_tbl. pg_rewind should copy it back. + primary_psql("insert into drop_tbl values ('in primary, after promotion')"); primary_psql("DROP TABLE drop_tbl"); # Before running pg_rewind, do a couple of extra tests with several |