summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/backend/tcop/postgres.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index b22ea3deb6..382112c727 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -2489,6 +2489,13 @@ quickdie(SIGNAL_ARGS)
PG_SETMASK(&BlockSig);
/*
+ * Prevent interrupts while exiting; though we just blocked signals that
+ * would queue new interrupts, one may have been pending. We don't want a
+ * quickdie() downgraded to a mere query cancel.
+ */
+ HOLD_INTERRUPTS();
+
+ /*
* Ideally this should be ereport(FATAL), but then we'd not get control
* back...
*/