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