]> granicus.if.org Git - postgresql/commit
Fix pg_resetxlog to use correct path to postmaster.pid.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 22 Nov 2012 16:23:42 +0000 (11:23 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 22 Nov 2012 16:23:42 +0000 (11:23 -0500)
commit60511606fbb6d7882e4e048f85569e1bd915332d
treee3519e0ed686339665aca12779c9a7bbe2e937bd
parent9e74c02259f4bdd77a35c2e2547fd78a8ec41552
Fix pg_resetxlog to use correct path to postmaster.pid.

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