summaryrefslogtreecommitdiff
path: root/src/tools/git-external-diff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2015-10-06 17:15:27 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2015-10-06 17:15:27 -0400
commit3d10f39709941f5562adf3d0fc4d61f91fac5ff5 (patch)
tree04b96ca0818457d9d56fac322dcd40eacb746df2 /src/tools/git-external-diff
parent69157086413efb8c1de793aa4493187c819cc5ae (diff)
Perform an immediate shutdown if the postmaster.pid file is removed.
The postmaster now checks every minute or so (worst case, at most two minutes) that postmaster.pid is still there and still contains its own PID. If not, it performs an immediate shutdown, as though it had received SIGQUIT. The original goal behind this change was to ensure that failed buildfarm runs would get fully cleaned up, even if the test scripts had left a postmaster running, which is not an infrequent occurrence. When the buildfarm script removes a test postmaster's $PGDATA directory, its next check on postmaster.pid will fail and cause it to exit. Previously, manual intervention was often needed to get rid of such orphaned postmasters, since they'd block new test postmasters from obtaining the expected socket address. However, by checking postmaster.pid and not something else, we can provide additional robustness: manual removal of postmaster.pid is a frequent DBA mistake, and now we can at least limit the damage that will ensue if a new postmaster is started while the old one is still alive. Back-patch to all supported branches, since we won't get the desired improvement in buildfarm reliability otherwise.
Diffstat (limited to 'src/tools/git-external-diff')
0 files changed, 0 insertions, 0 deletions