pgsql: Fix LOCK_TIMEOUT handling during parallel apply.
От | Amit Kapila |
---|---|
Тема | pgsql: Fix LOCK_TIMEOUT handling during parallel apply. |
Дата | |
Msg-id | E1v1H4d-002FwM-24@gemulon.postgresql.org обсуждение исходный текст |
Список | pgsql-committers |
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 <duffieldzane@gmail.com> Diagnosed-by: Zhijie Hou <houzj.fnst@fujitsu.com> Author: Hayato Kuroda <kuroda.hayato@fujitsu.com> Reviewed-by: Amit Kapila <amit.kapila16@gmail.com> Backpatch-through: 16, where it was introduced Discussion: https://postgr.es/m/CACMiCkXyC4au74kvE2g6Y=mCEF8X6r-Ne_ty4r7qWkUjRE4+oQ@mail.gmail.com Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/a54c7a1133a4338c09b435f7870152f305bbf3ad 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(-)
В списке pgsql-committers по дате отправления: