]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Make WL_POSTMASTER_DEATH level-triggered on kqueue builds.
authorThomas Munro <tmunro@postgresql.org>
Wed, 14 Oct 2020 22:31:20 +0000 (11:31 +1300)
committerThomas Munro <tmunro@postgresql.org>
Wed, 14 Oct 2020 22:42:17 +0000 (11:42 +1300)
commite0950135ae5d50140feecc7bc87c018019c6e406
tree35ed441f1cf54f518ae3e55f2c9d4ba4e9a23326
parent855b6f287100f3eab24df0a83998db251ac4fd09
Make WL_POSTMASTER_DEATH level-triggered on kqueue builds.

If WaitEventSetWait() reports that the postmaster has gone away, later
calls to WaitEventSetWait() should continue to report that.  Otherwise
further waits that occur in the proc_exit() path after we already
noticed the postmaster's demise could block forever.

Back-patch to 13, where the kqueue support landed.

Reported-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/3624029.1602701929%40sss.pgh.pa.us
src/backend/storage/ipc/latch.c