summaryrefslogtreecommitdiff
path: root/src/timezone/strftime.c
diff options
context:
space:
mode:
authorRobert Haas2015-03-19 14:56:34 +0000
committerRobert Haas2015-03-19 15:04:09 +0000
commitbf740ce9e5d82612889d131f34c079215973ca00 (patch)
tree18c630fa140fd564442c7761eeb0a028bc216d2e /src/timezone/strftime.c
parent417f78a5178815d8c10f86b1561c88c45c53c2d2 (diff)
Fix status reporting for terminated bgworkers that were never started.
Previously, GetBackgroundWorkerPid() would return BGWH_NOT_YET_STARTED if the slot used for the worker registration had not been reused by unrelated activity, and BGWH_STOPPED if it had. Either way, a process that had requested notification when the state of one of its background workers changed did not receive such notifications. Fix things so that GetBackgroundWorkerPid() always returns BGWH_STOPPED in this situation, so that we do not erroneously give waiters the impression that the worker will eventually be started; and send notifications just as we would if the process terminated after having been started, so that it's possible to wait for the postmaster to process a worker termination request without polling. Discovered by Amit Kapila during testing of parallel sequential scan. Analysis and fix by me. Back-patch to 9.4; there may not be anyone relying on this interface yet, but if anyone is, the new behavior is a clear improvement.
Diffstat (limited to 'src/timezone/strftime.c')
0 files changed, 0 insertions, 0 deletions