@@ -2648,13 +2648,6 @@ die(SIGNAL_ARGS)
2648
2648
{
2649
2649
InterruptPending = true;
2650
2650
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 ();
2658
2651
}
2659
2652
2660
2653
/* If we're still here, waken anything waiting on the process latch */
@@ -2688,13 +2681,6 @@ StatementCancelHandler(SIGNAL_ARGS)
2688
2681
{
2689
2682
InterruptPending = true;
2690
2683
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 ();
2698
2684
}
2699
2685
2700
2686
/* If we're still here, waken anything waiting on the process latch */
@@ -2835,13 +2821,6 @@ RecoveryConflictInterrupt(ProcSignalReason reason)
2835
2821
*/
2836
2822
if (reason == PROCSIG_RECOVERY_CONFLICT_DATABASE )
2837
2823
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 ();
2845
2824
}
2846
2825
2847
2826
/*
@@ -2875,7 +2854,6 @@ ProcessInterrupts(void)
2875
2854
{
2876
2855
ProcDiePending = false;
2877
2856
QueryCancelPending = false;/* ProcDie trumps QueryCancel */
2878
- ImmediateInterruptOK = false;/* not idle anymore */
2879
2857
LockErrorCleanup ();
2880
2858
/* As in quickdie, don't risk sending to client during auth */
2881
2859
if (ClientAuthInProgress && whereToSendOutput == DestRemote )
@@ -2914,7 +2892,6 @@ ProcessInterrupts(void)
2914
2892
if (ClientConnectionLost )
2915
2893
{
2916
2894
QueryCancelPending = false;/* lost connection trumps QueryCancel */
2917
- ImmediateInterruptOK = false;/* not idle anymore */
2918
2895
LockErrorCleanup ();
2919
2896
/* don't send to client, we already know the connection to be dead. */
2920
2897
whereToSendOutput = DestNone ;
@@ -2932,7 +2909,6 @@ ProcessInterrupts(void)
2932
2909
if (RecoveryConflictPending && DoingCommandRead )
2933
2910
{
2934
2911
QueryCancelPending = false;/* this trumps QueryCancel */
2935
- ImmediateInterruptOK = false;/* not idle anymore */
2936
2912
RecoveryConflictPending = false;
2937
2913
LockErrorCleanup ();
2938
2914
pgstat_report_recovery_conflict (RecoveryConflictReason );
@@ -2970,7 +2946,6 @@ ProcessInterrupts(void)
2970
2946
*/
2971
2947
if (get_timeout_indicator (LOCK_TIMEOUT , true))
2972
2948
{
2973
- ImmediateInterruptOK = false;/* not idle anymore */
2974
2949
(void )get_timeout_indicator (STATEMENT_TIMEOUT , true);
2975
2950
LockErrorCleanup ();
2976
2951
ereport (ERROR ,
@@ -2979,23 +2954,20 @@ ProcessInterrupts(void)
2979
2954
}
2980
2955
if (get_timeout_indicator (STATEMENT_TIMEOUT , true))
2981
2956
{
2982
- ImmediateInterruptOK = false;/* not idle anymore */
2983
2957
LockErrorCleanup ();
2984
2958
ereport (ERROR ,
2985
2959
(errcode (ERRCODE_QUERY_CANCELED ),
2986
2960
errmsg ("canceling statement due to statement timeout" )));
2987
2961
}
2988
2962
if (IsAutoVacuumWorkerProcess ())
2989
2963
{
2990
- ImmediateInterruptOK = false;/* not idle anymore */
2991
2964
LockErrorCleanup ();
2992
2965
ereport (ERROR ,
2993
2966
(errcode (ERRCODE_QUERY_CANCELED ),
2994
2967
errmsg ("canceling autovacuum task" )));
2995
2968
}
2996
2969
if (RecoveryConflictPending )
2997
2970
{
2998
- ImmediateInterruptOK = false;/* not idle anymore */
2999
2971
RecoveryConflictPending = false;
3000
2972
LockErrorCleanup ();
3001
2973
pgstat_report_recovery_conflict (RecoveryConflictReason );
@@ -3012,7 +2984,6 @@ ProcessInterrupts(void)
3012
2984
*/
3013
2985
if (!DoingCommandRead )
3014
2986
{
3015
- ImmediateInterruptOK = false;/* not idle anymore */
3016
2987
LockErrorCleanup ();
3017
2988
ereport (ERROR ,
3018
2989
(errcode (ERRCODE_QUERY_CANCELED ),