Fix pg_resetxlog to use correct path to postmaster.pid.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 22 Nov 2012 16:23:46 +0000 (11:23 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 22 Nov 2012 16:23:46 +0000 (11:23 -0500)
commit336bc0dff20e47344337a99a3aeba9e2e5385af0
tree7229c97010213f9ca6d7ba11b4f50f2c00a582d9
parent3352e25e85b28ee1f21e0a759c0c49e399cb032a
Fix pg_resetxlog to use correct path to postpid.

Since we've already chdir'd into the data directory, the file should
be referenced as just "postmaster.pid", without prefixing the directory
path.  This is harmless in the normal case where an absolute PGDATA path
is used, but quite dangerous if a relative path is specified, since the
program might then fail to notice an active postmaster.

Reported by Hari Babu.  This got broken in my commit
eb5949d190e80360386113fde0f05854f0c9824d, so patch all active versions.
src/bin/pg_resetxlog/pg_resetxlog.c