public inbox for [email protected]
help / color / mirror / Atom feedFrom: Heikki Linnakangas <[email protected]>
To: Jelte Fennema-Nio <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Cc: Alvaro Herrera <[email protected]>
Cc: Jacob Champion <[email protected]>
Subject: Re: Don't use the deprecated and insecure PQcancel in our frontend tools anymore
Date: Tue, 7 Jul 2026 01:12:57 +0300
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
On 04/07/2026 01:28, Jelte Fennema-Nio wrote:
> On Tue, 7 Apr 2026 at 02:18, Heikki Linnakangas <[email protected]> wrote:
>> The cancel handling in wait_on_slots() in parallel_slot.c is surprising
>> in a different way. It already uses async libpq calls and has a select()
>> loop, but it still relies on the signal handler to do the cancellation.
>> And it arbitrarily PQcancel()s only one of the connections it waits on.
>
> Addressed this in 0002
This relies on the signal to interrupt select(), but I'm afraid that's
not guaranteed on all platforms. Also, there's a race condition if the
signal arrives *just* before you call select(). That's what the
"self-pipe hack" is for, see comments at waiteventset.c.
- Heikki
view thread (24+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: Don't use the deprecated and insecure PQcancel in our frontend tools anymore
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox