]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Constistent naming for datacheckusms processes
authorDaniel Gustafsson <dgustafsson@postgresql.org>
Fri, 29 May 2026 19:26:25 +0000 (21:26 +0200)
committerDaniel Gustafsson <dgustafsson@postgresql.org>
Fri, 29 May 2026 19:26:25 +0000 (21:26 +0200)
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
src/include/postmaster/proctypelist.h
src/test/modules/test_checksums/t/002_restarts.pl
src/test/modules/test_checksums/t/003_standby_restarts.pl
src/test/modules/test_checksums/t/DataChecksums/Utils.pm
src/test/regress/expected/stats.out

index b578a7cc70e794bad10c7e7c6116e184b982b454..a49a31d1281d638754c514ac9166a2f5f5d4ce9d 100644 (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);
index b3477e6f17a4bb264ba8bdfe8300a3c2d2fc0e50..152fde394f47ee4d4534efa19d2d8494d1f9d17c 100644 (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)
index bab59be82bd91901d9f54f413c93a58409ca8762..1aa2c0c65e5ee69f3152c8e54a2a233f561841c3 100644 (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');
 
index 2ac51344585d65770e95a4afd2a82aac9aeb6a7c..bb35ed0b325a59936194ce55fb625683e04b44b8 100644 (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');
 
index cb78dd6ecfbbb5d310e11cd414d3dd73b3432874..3aa533d777f637c4b66bb921c82c8dcfe30710a0 100644 (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';");
        }
 }
 
index c551abb117885a784f186632b42598faf1d56200..bbb1db3c4334737e692e1c9ce45fddac239bcde7 100644 (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