Use condition variables for ProcSignalBarriers.
authorThomas Munro <tmunro@postgresql.org>
Mon, 1 Mar 2021 03:26:22 +0000 (16:26 +1300)
committerThomas Munro <tmunro@postgresql.org>
Mon, 1 Mar 2021 04:23:43 +0000 (17:23 +1300)
commit814f1d8bc395bb9b4c0ae090ceea60adfbeb8e49
treebc3b72c9dfc433c280bf83f2670aab83fb364c7c
parent8bdb1332eb51837c15a10a972c179b84f654279e
Use condition variables for ProcSignalBarriers.

Instead of a poll/sleep loop, use a condition variable for precise
wake-up whenever a backend's pss_barrierGeneration advances.

Discussion: https://postgr.es/m/CA+hUKGLdemy2gBm80kz20GTe6hNVwoErE8KwcJk6-U56oStjtg@mail.gmail.com
src/backend/storage/ipc/procsignal.c