pgsql: Add condition variable for walreceiver shutdown.

From: Thomas Munro <tmunro(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add condition variable for walreceiver shutdown.
Date: 2021-03-12 06:55:21
Message-ID: E1lKbhh-00015F-HX@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Amit Kapila 2021-03-12 09:49:10 pgsql: Fix use of relcache TriggerDesc field introduced by commit 05c84
Previous Message Fujii Masao 2021-03-12 05:24:01 pgsql: Send statistics collected during shutdown checkpoint to the stat