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 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/de829ddf23f69190efb4e0178704c4c4228e17cd Modified Files -------------- doc/src/sgml/monitoring.sgml | 4 +++ src/backend/postmaster/pgstat.c | 3 +++ src/backend/replication/walreceiver.c | 3 +++ src/backend/replication/walreceiverfuncs.c | 41 ++++++++++++++++++++---------- src/include/pgstat.h | 1 + src/include/replication/walreceiver.h | 2 ++ 6 files changed, 41 insertions(+), 13 deletions(-)