Fix pg_rewind when pg_xlog is a symlink.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 3 Aug 2015 12:23:56 +0000 (15:23 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 3 Aug 2015 12:25:12 +0000 (15:25 +0300)
commit615b69595525385bbf050a170912b7671cacc5c8
tree6f2d8bf875adb038fccbef443c16e30e07f7899d
parent2b917a58aec17ca5cf64196ee1d5d77ef8635caf
Fix pg_rewind when pg_xlog is a symlink.

pg_xlog is often a symlink, typically to a different filesystem. Don't
get confused and comlain about by that, and just always pretend that it's a
normal directory, even if it's really a symlink.

Also add a test case for this.

Backpatch to 9.5.
src/bin/pg_rewind/RewindTest.pm
src/bin/pg_rewind/filemap.c
src/bin/pg_rewind/t/001_basic.pl
src/bin/pg_rewind/t/002_databases.pl
src/bin/pg_rewind/t/003_extrafiles.pl
src/bin/pg_rewind/t/004_pg_xlog_symlink.pl [new file with mode: 0644]