diff options
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r-- | src/backend/tcop/postgres.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 7e9408e61d9..63573046a9e 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -2880,7 +2880,11 @@ ProcessInterrupts(void) /* As in quickdie, don't risk sending to client during auth */ if (ClientAuthInProgress && whereToSendOutput == DestRemote) whereToSendOutput = DestNone; - if (IsAutoVacuumWorkerProcess()) + if (ClientAuthInProgress) + ereport(FATAL, + (errcode(ERRCODE_QUERY_CANCELED), + errmsg("canceling authentication due to timeout"))); + else if (IsAutoVacuumWorkerProcess()) ereport(FATAL, (errcode(ERRCODE_ADMIN_SHUTDOWN), errmsg("terminating autovacuum process due to administrator command"))); @@ -2959,17 +2963,6 @@ ProcessInterrupts(void) } QueryCancelPending = false; - if (ClientAuthInProgress) - { - ImmediateInterruptOK = false; /* not idle anymore */ - LockErrorCleanup(); - /* As in quickdie, don't risk sending to client during auth */ - if (whereToSendOutput == DestRemote) - whereToSendOutput = DestNone; - ereport(ERROR, - (errcode(ERRCODE_QUERY_CANCELED), - errmsg("canceling authentication due to timeout"))); - } /* * If LOCK_TIMEOUT and STATEMENT_TIMEOUT indicators are both set, we |