From: Daniel Gustafsson <dgustafsson@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Make data checksums launcher cancel its worker at SIGINT
Date: Mon, 17 Aug 2026 20:47:05 +0000
Message-ID: <E1ww4Ea-00000000xsE-2THm@gemulon.postgresql.org> (raw)
Make data checksums launcher cancel its worker at SIGINT
Make sure the launcher cancels the currently running worker by calling
TerminateBackgroundWorker when it receives SIGINT. In order to handle
cases where SIGINT arrives while tje launcher is waiting for a worker
to start or exit, implement a version of WaitForBackgroundWorkerStartup
and WaitForBackgroundWorkerShutdown which checks the abort_requested
signalling. A new test which kills processing with SIGINT is added.
Backpatch to v19 where online checksums were introduced.
Author: Fujii Masao <masao.fujii@gmail.com>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Discussion: https://postgr.es/m/CAHGQGwEQ1-+iPQnUpTXYiHmzSz9ufFVkOK4kL_uyTdYt7jgg0Q@mail.gmail.com
Backpatch-through: 19
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/ed6775db84db7d28c787bbe4b9e8989f3e8f107a
Modified Files
--------------
src/backend/postmaster/datachecksum_state.c | 112 +++++++++++++++++++---
src/test/modules/test_checksums/t/002_restarts.pl | 42 ++++++++
2 files changed, 143 insertions(+), 11 deletions(-)
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: pgsql-committers@postgresql.org
Cc: dgustafsson@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Make data checksums launcher cancel its worker at SIGINT
In-Reply-To: <E1ww4Ea-00000000xsE-2THm@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox