summaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
diff options
context:
space:
mode:
authorBruce Momjian2008-04-15 20:28:47 +0000
committerBruce Momjian2008-04-15 20:28:47 +0000
commitb04b32a543763a8eade2fa2aad87ac42059f1543 (patch)
treedd6aa821090784c78df20cbbef02dd755780fe25 /src/backend/tcop/postgres.c
parent804a55113a397033a49a110db8e0f5cda7bacaf3 (diff)
Revert addition of pg_terminate_backend() because of race conditions.
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r--src/backend/tcop/postgres.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index 2c7ab98ae6..56efa4cbf7 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -2541,8 +2541,7 @@ StatementCancelHandler(SIGNAL_ARGS)
* waiting for input, however.
*/
if (ImmediateInterruptOK && InterruptHoldoffCount == 0 &&
- CritSectionCount == 0 &&
- (!DoingCommandRead || MyProc->terminate))
+ CritSectionCount == 0 && !DoingCommandRead)
{
/* bump holdoff count to make ProcessInterrupts() a no-op */
/* until we are done getting ready for it */
@@ -2622,10 +2621,6 @@ ProcessInterrupts(void)
ereport(ERROR,
(errcode(ERRCODE_QUERY_CANCELED),
errmsg("canceling autovacuum task")));
- else if (MyProc->terminate)
- ereport(ERROR,
- (errcode(ERRCODE_ADMIN_SHUTDOWN),
- errmsg("terminating backend due to administrator command")));
else
ereport(ERROR,
(errcode(ERRCODE_QUERY_CANCELED),
@@ -3464,9 +3459,6 @@ PostgresMain(int argc, char *argv[], const char *username)
/* We don't have a transaction command open anymore */
xact_started = false;
- if (MyProc->terminate)
- die(SIGINT);
-
/* Now we can allow interrupts again */
RESUME_INTERRUPTS();
}