Re: Is RecoveryConflictInterrupt() entirely safe in a signal handler? - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: Is RecoveryConflictInterrupt() entirely safe in a signal handler?
Date
Msg-id CA+hUKG+kHaAB2q_Ha8fVFh-4wFR_cTpmYLgesk_9bz+4MffYnw@mail.gmail.com
Whole thread Raw
In response to Re: Is RecoveryConflictInterrupt() entirely safe in a signal handler?  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
On Wed, Jun 22, 2022 at 1:04 PM Michael Paquier <michael@paquier.xyz> wrote:
> With the patch, we should always have QueryCancelPending set to false,
> as long as there are no QueryCancelHoldoffCount.  Perhaps an extra
> assertion for QueryCancelPending could be added at the beginning of
> ProcessRecoveryConflictInterrupts(), in combination of the one already
> present for InterruptHoldoffCount.  I agree that's a minor point,
> though.

But QueryCancelPending can be set to true at any time by
StatementCancelHandler(), if we receive SIGINT.



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: amcheck is using a wrong macro to check compressed-ness
Next
From: Andres Freund
Date:
Subject: Re: Is RecoveryConflictInterrupt() entirely safe in a signal handler?