Re: Converting pqsignal to void return - Mailing list pgsql-hackers

From Paul Ramsey
Subject Re: Converting pqsignal to void return
Date
Msg-id AD9CFCF4-B2AD-4138-8E69-76DB068873A3@cleverelephant.ca
Whole thread Raw
In response to Re: Converting pqsignal to void return  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers

> On Jan 22, 2025, at 8:50 AM, Andres Freund <andres@anarazel.de> wrote:
>
>> It is possible we have been Doing It Wrong all this time, and would love some pointers on the right way to do this.
>
> All your interrupt handler is doing "for you" is setting
> http_interrupt_requested, right?  Why do you need that variable? Seems you
> could just check postgres' QueryCancelPending? And perhaps ProcDiePending, if
> you want to handle termination too.

This is the Knowledge that was sitting right in front of me, but I could not see.
From the road to Damascus,
Paul




pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Converting pqsignal to void return
Next
From: Alvaro Herrera
Date:
Subject: Re: Quadratic planning time for ordered paths over partitioned tables