Hi, albeit just a test module, the test_shm_mq test can run a few seconds, and during that, it looks like this:
mbanck 2701 - Rsfo 0:00.51 postgres: With the attached patch, it looks like this: mbanck 2780 - Rsfo 0:01.63 postgres: test_shm_mq worker I think the process title got lost in 5373bc2a where bgw_name was replaced with bgw_type. Maybe that was intentional, but the corresponding change to src/test/modules/worker_spi was made so that bgw_name was preserved/changed. Michael
From 2cc615e50b71fc6afcdb40ee04a463c078d8c8c3 Mon Sep 17 00:00:00 2001 From: Michael Banck <[email protected]> Date: Mon, 2 Feb 2026 18:23:20 +0100 Subject: [PATCH v1] Fix process title/name for test_shm_mq background worker. Since 5373bc2a, the process title was no longer set, so that the background worker process looked like "postgres:" in ps output or top. --- src/test/modules/test_shm_mq/setup.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/test/modules/test_shm_mq/setup.c b/src/test/modules/test_shm_mq/setup.c index ba2fd746d73..9925f974a98 100644 --- a/src/test/modules/test_shm_mq/setup.c +++ b/src/test/modules/test_shm_mq/setup.c @@ -220,6 +220,7 @@ setup_background_workers(int nworkers, dsm_segment *seg) worker.bgw_restart_time = BGW_NEVER_RESTART; sprintf(worker.bgw_library_name, "test_shm_mq"); sprintf(worker.bgw_function_name, "test_shm_mq_main"); + snprintf(worker.bgw_name, BGW_MAXLEN, "test_shm_mq worker"); snprintf(worker.bgw_type, BGW_MAXLEN, "test_shm_mq"); worker.bgw_main_arg = UInt32GetDatum(dsm_segment_handle(seg)); /* set bgw_notify_pid, so we can detect if the worker stops */ -- 2.39.5
