Re: Is RecoveryConflictInterrupt() entirely safe in a signal handler?

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Is RecoveryConflictInterrupt() entirely safe in a signal handler?
Date: 2022-06-22 02:09:08
Message-ID: CA+hUKG+kHaAB2q_Ha8fVFh-4wFR_cTpmYLgesk_9bz+4MffYnw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jun 22, 2022 at 1:04 PM Michael Paquier <michael(at)paquier(dot)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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2022-06-22 02:33:01 Re: Is RecoveryConflictInterrupt() entirely safe in a signal handler?
Previous Message Michael Paquier 2022-06-22 01:56:26 Re: amcheck is using a wrong macro to check compressed-ness