@@ -2648,13 +2648,6 @@ die(SIGNAL_ARGS)
26482648 {
26492649 InterruptPending = true;
26502650 ProcDiePending = 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 {
26892682 InterruptPending = true;
26902683 QueryCancelPending = 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 */
28362822 if (reason == PROCSIG_RECOVERY_CONFLICT_DATABASE )
28372823 RecoveryConflictRetryable = 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 {
28762855 ProcDiePending = false;
28772856 QueryCancelPending = false; /* ProcDie trumps QueryCancel */
2878- ImmediateInterruptOK = false; /* not idle anymore */
28792857 LockErrorCleanup ();
28802858 /* As in quickdie, don't risk sending to client during auth */
28812859 if (ClientAuthInProgress && whereToSendOutput == DestRemote )
@@ -2914,7 +2892,6 @@ ProcessInterrupts(void)
29142892 if (ClientConnectionLost )
29152893 {
29162894 QueryCancelPending = false; /* lost connection trumps QueryCancel */
2917- ImmediateInterruptOK = false; /* not idle anymore */
29182895 LockErrorCleanup ();
29192896 /* don't send to client, we already know the connection to be dead. */
29202897 whereToSendOutput = DestNone ;
@@ -2932,7 +2909,6 @@ ProcessInterrupts(void)
29322909 if (RecoveryConflictPending && DoingCommandRead )
29332910 {
29342911 QueryCancelPending = false; /* this trumps QueryCancel */
2935- ImmediateInterruptOK = false; /* not idle anymore */
29362912 RecoveryConflictPending = false;
29372913 LockErrorCleanup ();
29382914 pgstat_report_recovery_conflict (RecoveryConflictReason );
@@ -2970,7 +2946,6 @@ ProcessInterrupts(void)
29702946 */
29712947 if (get_timeout_indicator (LOCK_TIMEOUT , true))
29722948 {
2973- ImmediateInterruptOK = false; /* not idle anymore */
29742949 (void ) get_timeout_indicator (STATEMENT_TIMEOUT , true);
29752950 LockErrorCleanup ();
29762951 ereport (ERROR ,
@@ -2979,23 +2954,20 @@ ProcessInterrupts(void)
29792954 }
29802955 if (get_timeout_indicator (STATEMENT_TIMEOUT , true))
29812956 {
2982- ImmediateInterruptOK = false; /* not idle anymore */
29832957 LockErrorCleanup ();
29842958 ereport (ERROR ,
29852959 (errcode (ERRCODE_QUERY_CANCELED ),
29862960 errmsg ("canceling statement due to statement timeout" )));
29872961 }
29882962 if (IsAutoVacuumWorkerProcess ())
29892963 {
2990- ImmediateInterruptOK = false; /* not idle anymore */
29912964 LockErrorCleanup ();
29922965 ereport (ERROR ,
29932966 (errcode (ERRCODE_QUERY_CANCELED ),
29942967 errmsg ("canceling autovacuum task" )));
29952968 }
29962969 if (RecoveryConflictPending )
29972970 {
2998- ImmediateInterruptOK = false; /* not idle anymore */
29992971 RecoveryConflictPending = false;
30002972 LockErrorCleanup ();
30012973 pgstat_report_recovery_conflict (RecoveryConflictReason );
@@ -3012,7 +2984,6 @@ ProcessInterrupts(void)
30122984 */
30132985 if (!DoingCommandRead )
30142986 {
3015- ImmediateInterruptOK = false; /* not idle anymore */
30162987 LockErrorCleanup ();
30172988 ereport (ERROR ,
30182989 (errcode (ERRCODE_QUERY_CANCELED ),
0 commit comments