Fix LOCK_TIMEOUT handling during parallel apply. Previously, the parallel apply worker used SIGINT to receive a graceful shutdown signal from the leader apply worker. However, SIGINT is also used by the LOCK_TIMEOUT handler to trigger a query-cancel interrupt. This overlap caused the parallel apply worker to miss LOCK_TIMEOUT signals, leading to incorrect behavior during lock wait/contention.
This patch resolves the conflict by switching the graceful shutdown signal from SIGINT to SIGUSR2. Reported-by: Zane Duffield <[email protected]> Diagnosed-by: Zhijie Hou <[email protected]> Author: Hayato Kuroda <[email protected]> Reviewed-by: Amit Kapila <[email protected]> Backpatch-through: 16, where it was introduced Discussion: https://postgr.es/m/CACMiCkXyC4au74kvE2g6Y=mcef8x6r-ne_ty4r7qwkujre4...@mail.gmail.com Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/2f6e1a49066f512813c0ad0b4a77e0fd04a3a508 Modified Files -------------- src/backend/postmaster/interrupt.c | 5 ++--- src/backend/replication/logical/applyparallelworker.c | 17 ++++++++++++----- src/backend/replication/logical/launcher.c | 4 ++-- 3 files changed, 16 insertions(+), 10 deletions(-)
