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
This commit is contained in:
Daniel Gustafsson 2026-05-29 21:26:25 +02:00
parent 0ca1b30105
commit 5ab239c9a9
6 changed files with 28 additions and 28 deletions

View file

@ -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);

View file

@ -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)

View file

@ -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');

View file

@ -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');

View file

@ -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';");
}
}

View file

@ -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