Add condition variable for walreceiver shutdown.
Thomas Munro <tmunro@postgresql.org>
Add condition variable for walreceiver shutdown. Use this new CV to wait for walreceiver shutdown without a sleep/poll loop, while also benefiting from standard postmaster death handling. Discussion: https://postgr.es/m/CA%2BhUKGK1607VmtrDUHQXrsooU%3Dap4g4R2yaoByWOOA3m8xevUQ%40mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/monitoring.sgml | modified | +4 −0 |
| src/backend/postmaster/pgstat.c | modified | +3 −0 |
| src/backend/replication/walreceiver.c | modified | +3 −0 |
| src/backend/replication/walreceiverfuncs.c | modified | +28 −13 |
| src/include/pgstat.h | modified | +1 −0 |
| src/include/replication/walreceiver.h | modified | +2 −0 |
Documentation touched
Discussion
- PostmasterIsAlive() in recovery (non-USE_POST_MASTER_DEATH_SIGNAL builds) 26 messages · 2020-09-17 → 2021-07-12