From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Extend the ProcSignal mechanism to support barriers.
Date: Thu, 19 Dec 2019 19:56:38 +0000
Message-ID: <E1ii1uY-0007Hy-CF@gemulon.postgresql.org> (raw)
Extend the ProcSignal mechanism to support barriers.
A new function EmitProcSignalBarrier() can be used to emit a global
barrier which all backends that participate in the ProcSignal
mechanism must absorb, and a new function WaitForProcSignalBarrier()
can be used to wait until all relevant backends have in fact
absorbed the barrier.
This can be used to coordinate global state changes, such as turning
checksums on while the system is running.
There's no real client of this mechanism yet, although two are
proposed, but an enum has to have at least one element, so this
includes a placeholder type (PROCSIGNAL_BARRIER_PLACEHOLDER) which
should be replaced by the first real client of this mechanism to
get committed.
Andres Freund and Robert Haas, reviewed by Daniel Gustafsson and,
in earlier versions, by Magnus Hagander.
Discussion: http://postgr.es/m/CA+TgmoZwDk=BguVDVa+qdA6SBKef=PKbaKDQALTC_9qoz1mJqg@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/16a4e4aecd47da7a6c4e1ebc20f6dd1a13f9133b
Modified Files
--------------
doc/src/sgml/monitoring.sgml | 6 +-
src/backend/postmaster/autovacuum.c | 4 +
src/backend/postmaster/checkpointer.c | 7 +
src/backend/postmaster/interrupt.c | 4 +
src/backend/postmaster/pgstat.c | 3 +
src/backend/postmaster/startup.c | 6 +-
src/backend/replication/walreceiver.c | 3 +-
src/backend/storage/buffer/bufmgr.c | 10 ++
src/backend/storage/ipc/procsignal.c | 301 ++++++++++++++++++++++++++++++++--
src/backend/tcop/postgres.c | 3 +
src/backend/utils/init/globals.c | 1 +
src/include/miscadmin.h | 1 +
src/include/pgstat.h | 1 +
src/include/storage/procsignal.h | 14 ++
14 files changed, 350 insertions(+), 14 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: rhaas@postgresql.org
Subject: Re: pgsql: Extend the ProcSignal mechanism to support barriers.
In-Reply-To: <E1ii1uY-0007Hy-CF@gemulon.postgresql.org>
References: <E1ii1uY-0007Hy-CF@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox