]> granicus.if.org Git - postgresql/commit
While waiting for a condition variable, detect postmaster death.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 9 Jan 2018 17:34:46 +0000 (12:34 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 9 Jan 2018 17:34:46 +0000 (12:34 -0500)
commitd56a5f994c216847df3338e148b2ae72f20b2e0f
tree0fc7fb57ee4748369685cba435f9f694a7a73108
parent1f5adbd799cf5bf98259003840c69c65c6b021db
While waiting for a condition variable, detect postmaster death.

The general assumption for postmaster child processes is that they
should just exit(1), reasonably promptly, if the postmaster disappears.
condition_variable.c neglected this consideration and could be left
waiting forever, if the counterpart process it is waiting for has
done the right thing and exited.

We had some discussion of adjusting the WaitEventSet API to make it
harder to make this type of mistake in future; but for the moment,
and for v10, let's make this narrow fix.

Discussion: https://postgr.es/m/20412.1515456143@sss.pgh.pa.us
src/backend/storage/lmgr/condition_variable.c