postgres.git / summary / log / commit / refs
commit 5ab239c9a908ba5d8614d23fcdc425859a2fed3c
Author: Daniel Gustafsson <dgustafsson@postgresql.org>
Date: Fri May 29 19:26:25 2026 +0000
Constistent naming for datacheckusms processes
The launcher and worker for enabling/disabling checksums were named
"datachecksum worker|launcher" but using the plural form makes more
sense given the underlying GUC name data_checksums.
Author: Daniel Gustafsson <daniel@yesql.se>
Reported-by: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Discussion: https://postgr.es/m/20260528.121622.1662808269492494574.horikyota.ntt@gmail.com
src/backend/postmaster/datachecksum_state.c | 8 +++---
src/include/postmaster/proctypelist.h | 4 +--
src/test/modules/test_checksums/t/002_restarts.pl | 6 ++--
.../test_checksums/t/003_standby_restarts.pl | 2 +-
.../test_checksums/t/DataChecksums/Utils.pm | 4 +--
src/test/regress/expected/stats.out | 32 +++++++++++-----------
6 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/src/backend/postmaster/datachecksum_state.c b/src/backend/postmaster/datachecksum_state.c
index b578a7cc70e..a49a31d1281 100644
--- a/src/backend/postmaster/datachecksum_state.c
+++ b/src/backend/postmaster/datachecksum_state.c
@@ -623,8 +623,8 @@ StartDataChecksumsWorkerLauncher(DataChecksumsWorkerOperation op,
bgw.bgw_start_time = BgWorkerStart_RecoveryFinished;
snprintf(bgw.bgw_library_name, BGW_MAXLEN, "postgres");
snprintf(bgw.bgw_function_name, BGW_MAXLEN, "DataChecksumsWorkerLauncherMain");
- snprintf(bgw.bgw_name, BGW_MAXLEN, "datachecksum launcher");
- snprintf(bgw.bgw_type, BGW_MAXLEN, "datachecksum launcher");
+ snprintf(bgw.bgw_name, BGW_MAXLEN, "datachecksums launcher");
+ snprintf(bgw.bgw_type, BGW_MAXLEN, "datachecksums launcher");
bgw.bgw_restart_time = BGW_NEVER_RESTART;
bgw.bgw_notify_pid = MyProcPid;
bgw.bgw_main_arg = (Datum) 0;
@@ -807,8 +807,8 @@ ProcessDatabase(DataChecksumsWorkerDatabase *db)
bgw.bgw_start_time = BgWorkerStart_RecoveryFinished;
snprintf(bgw.bgw_library_name, BGW_MAXLEN, "postgres");
snprintf(bgw.bgw_function_name, BGW_MAXLEN, "%s", "DataChecksumsWorkerMain");
- snprintf(bgw.bgw_name, BGW_MAXLEN, "datachecksum worker");
- snprintf(bgw.bgw_type, BGW_MAXLEN, "datachecksum worker");
+ snprintf(bgw.bgw_name, BGW_MAXLEN, "datachecksums worker");
+ snprintf(bgw.bgw_type, BGW_MAXLEN, "datachecksums worker");
bgw.bgw_restart_time = BGW_NEVER_RESTART;
bgw.bgw_notify_pid = MyProcPid;
bgw.bgw_main_arg = ObjectIdGetDatum(db->dboid);
diff --git a/src/include/postmaster/proctypelist.h b/src/include/postmaster/proctypelist.h
index b3477e6f17a..152fde394f4 100644
--- a/src/include/postmaster/proctypelist.h
+++ b/src/include/postmaster/proctypelist.h
@@ -38,8 +38,8 @@ PG_PROCTYPE(B_BACKEND, "backend", gettext_noop("client backend"), BackendMain, t
PG_PROCTYPE(B_BG_WORKER, "bgworker", gettext_noop("background worker"), BackgroundWorkerMain, true)
PG_PROCTYPE(B_BG_WRITER, "bgwriter", gettext_noop("background writer"), BackgroundWriterMain, true)
PG_PROCTYPE(B_CHECKPOINTER, "checkpointer", gettext_noop("checkpointer"), CheckpointerMain, true)
-PG_PROCTYPE(B_DATACHECKSUMSWORKER_LAUNCHER, "checksums", gettext_noop("datachecksum launcher"), NULL, false)
-PG_PROCTYPE(B_DATACHECKSUMSWORKER_WORKER, "checksums", gettext_noop("datachecksum worker"), NULL, false)
+PG_PROCTYPE(B_DATACHECKSUMSWORKER_LAUNCHER, "checksums", gettext_noop("datachecksums launcher"), NULL, false)
+PG_PROCTYPE(B_DATACHECKSUMSWORKER_WORKER, "checksums", gettext_noop("datachecksums worker"), NULL, false)
PG_PROCTYPE(B_DEAD_END_BACKEND, "backend", gettext_noop("dead-end client backend"), BackendMain, true)
PG_PROCTYPE(B_INVALID, "postmaster", gettext_noop("unrecognized"), NULL, false)
PG_PROCTYPE(B_IO_WORKER, "ioworker", gettext_noop("io worker"), IoWorkerMain, true)
diff --git a/src/test/modules/test_checksums/t/002_restarts.pl b/src/test/modules/test_checksums/t/002_restarts.pl
index bab59be82bd..1aa2c0c65e5 100644
--- a/src/test/modules/test_checksums/t/002_restarts.pl
+++ b/src/test/modules/test_checksums/t/002_restarts.pl
@@ -65,7 +65,7 @@ SKIP:
$result = $node->poll_query_until(
'postgres',
"SELECT wait_event FROM pg_catalog.pg_stat_activity "
- . "WHERE backend_type = 'datachecksum worker';",
+ . "WHERE backend_type = 'datachecksums worker';",
'ChecksumEnableTemptableWait');
# The datachecksumsworker waits for temporary tables to disappear for 3
@@ -76,7 +76,7 @@ SKIP:
# Re-check the wait event to ensure we are blocked on the right thing.
$result = $node->safe_psql('postgres',
"SELECT wait_event FROM pg_catalog.pg_stat_activity "
- . "WHERE backend_type = 'datachecksum worker';");
+ . "WHERE backend_type = 'datachecksums worker';");
is($result, 'ChecksumEnableTemptableWait',
'ensure the correct wait condition is set');
test_checksum_state($node, 'inprogress-on');
@@ -100,7 +100,7 @@ is($result, '9999', 'ensure checksummed pages can be read back');
$result = $node->poll_query_until(
'postgres',
- "SELECT count(*) FROM pg_stat_activity WHERE backend_type LIKE 'datachecksum%';",
+ "SELECT count(*) FROM pg_stat_activity WHERE backend_type LIKE 'datachecksums%';",
'0');
is($result, 1, 'await datachecksums worker/launcher termination');
diff --git a/src/test/modules/test_checksums/t/003_standby_restarts.pl b/src/test/modules/test_checksums/t/003_standby_restarts.pl
index 2ac51344585..bb35ed0b325 100644
--- a/src/test/modules/test_checksums/t/003_standby_restarts.pl
+++ b/src/test/modules/test_checksums/t/003_standby_restarts.pl
@@ -95,7 +95,7 @@ is($result, '19998', 'ensure we can safely read all data with checksums');
$result = $node_primary->poll_query_until(
'postgres',
- "SELECT count(*) FROM pg_stat_activity WHERE backend_type LIKE 'datachecksum%';",
+ "SELECT count(*) FROM pg_stat_activity WHERE backend_type LIKE 'datachecksums%';",
'0');
is($result, 1, 'await datachecksums worker/launcher termination');
diff --git a/src/test/modules/test_checksums/t/DataChecksums/Utils.pm b/src/test/modules/test_checksums/t/DataChecksums/Utils.pm
index cb78dd6ecfb..3aa533d777f 100644
--- a/src/test/modules/test_checksums/t/DataChecksums/Utils.pm
+++ b/src/test/modules/test_checksums/t/DataChecksums/Utils.pm
@@ -148,7 +148,7 @@ EOQ
$postgresnode->poll_query_until('postgres',
"SELECT count(*) = 0 "
. "FROM pg_catalog.pg_stat_activity "
- . "WHERE backend_type = 'datachecksum launcher';");
+ . "WHERE backend_type = 'datachecksums launcher';");
}
}
}
@@ -184,7 +184,7 @@ sub disable_data_checksums
$postgresnode->poll_query_until('postgres',
"SELECT count(*) = 0 "
. "FROM pg_catalog.pg_stat_activity "
- . "WHERE backend_type = 'datachecksum launcher';");
+ . "WHERE backend_type = 'datachecksums launcher';");
}
}
diff --git a/src/test/regress/expected/stats.out b/src/test/regress/expected/stats.out
index c551abb1178..bbb1db3c433 100644
--- a/src/test/regress/expected/stats.out
+++ b/src/test/regress/expected/stats.out
@@ -51,22 +51,22 @@ client backend|relation|vacuum
client backend|temp relation|normal
client backend|wal|init
client backend|wal|normal
-datachecksum launcher|relation|bulkread
-datachecksum launcher|relation|bulkwrite
-datachecksum launcher|relation|init
-datachecksum launcher|relation|normal
-datachecksum launcher|relation|vacuum
-datachecksum launcher|temp relation|normal
-datachecksum launcher|wal|init
-datachecksum launcher|wal|normal
-datachecksum worker|relation|bulkread
-datachecksum worker|relation|bulkwrite
-datachecksum worker|relation|init
-datachecksum worker|relation|normal
-datachecksum worker|relation|vacuum
-datachecksum worker|temp relation|normal
-datachecksum worker|wal|init
-datachecksum worker|wal|normal
+datachecksums launcher|relation|bulkread
+datachecksums launcher|relation|bulkwrite
+datachecksums launcher|relation|init
+datachecksums launcher|relation|normal
+datachecksums launcher|relation|vacuum
+datachecksums launcher|temp relation|normal
+datachecksums launcher|wal|init
+datachecksums launcher|wal|normal
+datachecksums worker|relation|bulkread
+datachecksums worker|relation|bulkwrite
+datachecksums worker|relation|init
+datachecksums worker|relation|normal
+datachecksums worker|relation|vacuum
+datachecksums worker|temp relation|normal
+datachecksums worker|wal|init
+datachecksums worker|wal|normal
io worker|relation|bulkread
io worker|relation|bulkwrite
io worker|relation|init
[parent: 0ca1b3010597]