aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2008-04-15 20:28:47 +0000
committerBruce Momjian <bruce@momjian.us>2008-04-15 20:28:47 +0000
commit76365960d229dca0ad8454040233e3eaaeb413bb (patch)
treebabcf9c5edbe051dcd83178c7459fcd7ad0f5e5e /src/backend/tcop/postgres.c
parent2b8a795738ee6885044a5d022a4bc1418190c011 (diff)
downloadpostgresql-76365960d229dca0ad8454040233e3eaaeb413bb.tar.gz
postgresql-76365960d229dca0ad8454040233e3eaaeb413bb.zip
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.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index 60519bd8a95..d4f84d549b3 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.549 2008/04/15 13:55:11 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.550 2008/04/15 20:28:46 momjian Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
@@ -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();
}