aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/backend/tcop/postgres.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index 737feb6f69f..6d4d8ac0339 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -2809,6 +2809,16 @@ RecoveryConflictInterrupt(ProcSignalReason reason)
}
}
+ /*
+ * Set the process latch. This function essentially emulates signal
+ * handlers like die() and StatementCancelHandler() and it seems prudent
+ * to behave similarly as they do. Alternatively all plain backend code
+ * waiting on that latch, expecting to get interrupted by query cancels et
+ * al., would also need to set set_latch_on_sigusr1.
+ */
+ if (MyProc)
+ SetLatch(&MyProc->procLatch);
+
errno = save_errno;
}