pgsql: Misc cleanup in datachecksums_state.[ch]

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Misc cleanup in datachecksums_state.[ch]
Date: 2026-06-24 12:39:39
Message-ID: E1wcMtH-0001eo-16@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Misc cleanup in datachecksums_state.[ch]

Move DataChecksumsWorkerResult struct to the .c file. It's not used
anywhere else since commit 07009121c2 removed the injection point test
code that the comment referred to.

Mark StartDataChecksumsWorkerLauncher() as static, since it's not
called from outside the .c file. The DataChecksumsWorkerOperation
struct can then be moved into the .c file too.

Clarify the comment on StartDataChecksumsWorkerLauncher(). It said
"Main entry point for datachecksumsworker launcher process", but I
found that misleading. That description would be a better fit for
DataChecksumsWorkerLauncherMain(), which is the process's "main"
function, rather than StartDataChecksumsWorkerLauncher().

Fix comment on WaitForAllTransactionsToFinish() on postmaster death.
The comment claimed that it sets "the abort flag" on postmaster death,
but it actually just errors outs. Improve the comment to explain why
it doesn't just use WL_EXIT_ON_PM_DEATH.

Reviewed-by: Daniel Gustafsson <daniel(at)yesql(dot)se>
Discussion: https://www.postgresql.org/message-id/b283fbb9-298e-4953-9120-eefaf24fae20@iki.fi

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/0edbf72f76833a145cb8eca128b775a8f0090d15

Modified Files
--------------
src/backend/postmaster/datachecksum_state.c | 35 +++++++++++++++++++++--------
src/include/postmaster/datachecksum_state.h | 26 ---------------------
2 files changed, 26 insertions(+), 35 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2026-06-24 13:07:25 pgsql: Remove extraneous newlines from guc_parameters.dat
Previous Message Michael Paquier 2026-06-24 07:09:20 pgsql: Fix set of typos and grammar mistakes