Fix pg_resetxlog to use correct path to postmaster.pid.
authorTom Lane <[email protected]>
Thu, 22 Nov 2012 16:23:28 +0000 (11:23 -0500)
committerTom Lane <[email protected]>
Thu, 22 Nov 2012 16:24:46 +0000 (11:24 -0500)
commit430b47f382609c567bd87ff28a81ea5055d173d5
treea1d6fe39ad4b7970dbf9fcb69a3161ca9b7d5fa9
parentdda8b87b6a470249e9d4e3701849b7bd830bb96c
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