Fix stale idle flag when IO workers exit.
authorThomas Munro <tmunro@postgresql.org>
Fri, 11 Jul 2025 23:18:05 +0000 (11:18 +1200)
committerThomas Munro <tmunro@postgresql.org>
Sat, 12 Jul 2025 01:11:47 +0000 (13:11 +1200)
commit40e105042a4bec83ad8bc39e54edde2caf68d6a8
tree1416c678e1d5f20944ce6eddf1b3b0cdba8c2cda
parent64840e46243a5f672b9e2fcb8d93c63daec4bc9a
Fix stale idle flag when IO workers exit.

Otherwise we could choose a worker that has exited and crash while
trying to wake it up.

Back-patch to 18.

Reported-by: Tomas Vondra <tomas@vondra.me>
Reported-by: Andres Freund <andres@anarazel.de>
Discussion: http://postgr.es/m/t5aqjhkj6xdkido535pds7fk5z4finoxra4zypefjqnlieevbg%40357aaf6u525j
src/backend/storage/aio/method_worker.c