@@ -2648,13 +2648,6 @@ die(SIGNAL_ARGS)
26482648{
26492649InterruptPending = true;
26502650ProcDiePending = true;
2651-
2652- /*
2653- * If we're waiting for input or a lock so that it's safe to
2654- * interrupt, service the interrupt immediately
2655- */
2656- if (ImmediateInterruptOK )
2657- ProcessInterrupts ();
26582651}
26592652
26602653/* If we're still here, waken anything waiting on the process latch */
@@ -2688,13 +2681,6 @@ StatementCancelHandler(SIGNAL_ARGS)
26882681{
26892682InterruptPending = true;
26902683QueryCancelPending = true;
2691-
2692- /*
2693- * If we're waiting for input or a lock so that it's safe to
2694- * interrupt, service the interrupt immediately
2695- */
2696- if (ImmediateInterruptOK )
2697- ProcessInterrupts ();
26982684}
26992685
27002686/* If we're still here, waken anything waiting on the process latch */
@@ -2835,13 +2821,6 @@ RecoveryConflictInterrupt(ProcSignalReason reason)
28352821 */
28362822if (reason == PROCSIG_RECOVERY_CONFLICT_DATABASE )
28372823RecoveryConflictRetryable = false;
2838-
2839- /*
2840- * If we're waiting for input or a lock so that it's safe to
2841- * interrupt, service the interrupt immediately.
2842- */
2843- if (ImmediateInterruptOK )
2844- ProcessInterrupts ();
28452824}
28462825
28472826/*
@@ -2875,7 +2854,6 @@ ProcessInterrupts(void)
28752854{
28762855ProcDiePending = false;
28772856QueryCancelPending = false;/* ProcDie trumps QueryCancel */
2878- ImmediateInterruptOK = false;/* not idle anymore */
28792857LockErrorCleanup ();
28802858/* As in quickdie, don't risk sending to client during auth */
28812859if (ClientAuthInProgress && whereToSendOutput == DestRemote )
@@ -2914,7 +2892,6 @@ ProcessInterrupts(void)
29142892if (ClientConnectionLost )
29152893{
29162894QueryCancelPending = false;/* lost connection trumps QueryCancel */
2917- ImmediateInterruptOK = false;/* not idle anymore */
29182895LockErrorCleanup ();
29192896/* don't send to client, we already know the connection to be dead. */
29202897whereToSendOutput = DestNone ;
@@ -2932,7 +2909,6 @@ ProcessInterrupts(void)
29322909if (RecoveryConflictPending && DoingCommandRead )
29332910{
29342911QueryCancelPending = false;/* this trumps QueryCancel */
2935- ImmediateInterruptOK = false;/* not idle anymore */
29362912RecoveryConflictPending = false;
29372913LockErrorCleanup ();
29382914pgstat_report_recovery_conflict (RecoveryConflictReason );
@@ -2970,7 +2946,6 @@ ProcessInterrupts(void)
29702946 */
29712947if (get_timeout_indicator (LOCK_TIMEOUT , true))
29722948{
2973- ImmediateInterruptOK = false;/* not idle anymore */
29742949(void )get_timeout_indicator (STATEMENT_TIMEOUT , true);
29752950LockErrorCleanup ();
29762951ereport (ERROR ,
@@ -2979,23 +2954,20 @@ ProcessInterrupts(void)
29792954}
29802955if (get_timeout_indicator (STATEMENT_TIMEOUT , true))
29812956{
2982- ImmediateInterruptOK = false;/* not idle anymore */
29832957LockErrorCleanup ();
29842958ereport (ERROR ,
29852959(errcode (ERRCODE_QUERY_CANCELED ),
29862960errmsg ("canceling statement due to statement timeout" )));
29872961}
29882962if (IsAutoVacuumWorkerProcess ())
29892963{
2990- ImmediateInterruptOK = false;/* not idle anymore */
29912964LockErrorCleanup ();
29922965ereport (ERROR ,
29932966(errcode (ERRCODE_QUERY_CANCELED ),
29942967errmsg ("canceling autovacuum task" )));
29952968}
29962969if (RecoveryConflictPending )
29972970{
2998- ImmediateInterruptOK = false;/* not idle anymore */
29992971RecoveryConflictPending = false;
30002972LockErrorCleanup ();
30012973pgstat_report_recovery_conflict (RecoveryConflictReason );
@@ -3012,7 +2984,6 @@ ProcessInterrupts(void)
30122984 */
30132985if (!DoingCommandRead )
30142986{
3015- ImmediateInterruptOK = false;/* not idle anymore */
30162987LockErrorCleanup ();
30172988ereport (ERROR ,
30182989(errcode (ERRCODE_QUERY_CANCELED ),