postgresql/src/backend/tcop
Tom Lane 39b8ccb086 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
2021-05-14 12:54:26 -04:00
..
dest.c Add a new DestReceiver for printing tuples without catalog access. 2017-01-24 16:53:56 -05:00
fastpath.c Disallow calling anything but plain functions via the fastpath API. 2021-04-30 14:10:26 -04:00
Makefile Define WIN32_STACK_RLIMIT throughout win32 and cygwin builds. 2019-04-09 08:25:42 -07:00
postgres.c Refactor CHECK_FOR_INTERRUPTS() to add flexibility. 2021-05-14 12:54:26 -04:00
pquery.c Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
utility.c Further fixes for CREATE TABLE LIKE: cope with self-referential FKs. 2020-11-19 15:03:17 -05:00