From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Refactor CHECK_FOR_INTERRUPTS() to add flexibility.
Date: Fri, 14 May 2021 17:29:59 +0000
Message-ID: <E1lhbdP-0008JX-7Y@gemulon.postgresql.org> (raw)
Refactor CHECK_FOR_INTERRUPTS() to add flexibility.
Split up CHECK_FOR_INTERRUPTS() to provide an additional macro
INTERRUPTS_PENDING_CONDITION(), which just tests whether an
interrupt is pending without attempting to service it. This is
useful in situations where the caller knows that interrupts are
blocked, and would like to find out if it's worth the trouble
to unblock them.
Also add INTERRUPTS_CAN_BE_PROCESSED(), which indicates whether
CHECK_FOR_INTERRUPTS() can be relied on to clear the pending interrupt.
This commit doesn't actually add any uses of the new macros,
but a follow-on bug fix will do so. Back-patch to all supported
branches to provide infrastructure for that fix.
Alvaro Herrera and Tom Lane
Discussion: https://postgr.es/m/20210513155351.GA7848@alvherre.pgsql
Branch
------
REL_12_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/4c646b17985cdca9506428ebe2b13ebc5109c35a
Modified Files
--------------
src/backend/tcop/postgres.c | 14 ++++++++++++--
src/include/miscadmin.h | 34 +++++++++++++++++++++++-----------
2 files changed, 35 insertions(+), 13 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: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Refactor CHECK_FOR_INTERRUPTS() to add flexibility.
In-Reply-To: <E1lhbdP-0008JX-7Y@gemulon.postgresql.org>
References: <E1lhbdP-0008JX-7Y@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