Fix pg_rewind's handling of top-level symlinks.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 0381fefaa44f04e17dffb7e46e7677374a4fb2c7
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2015-05-28T16:44:39Z
Releases: 9.5.0
Fix pg_rewind's handling of top-level symlinks.

The previous coding suffered a null-pointer dereference if it found any
symlink at the top level of $PGDATA.  Fix that, and teach it to recurse
into a symlink for pg_xlog, but not anything else.

Per note from Abhijit Menon-Sen.

Files

PathChange+/−
src/bin/pg_rewind/copy_fetch.c modified +7 −2