Skip to content

Commit d9eb92c

Browse files
committed
worker_spi: Use term "dynamic" for bgworkers launched with worker_spi_launch()
This gives a way to make a difference between workers registered when the library is loaded with shared_preload_libraries and when these are launched dynamically, in ps output or pg_stat_activity. Extracted from a larger patch by the same author. Author: Bharath Rupireddy Reviewed-by: Masahiro Ikeda Discussion: https://postgr.es/m/CALj2ACWR9ncAiDF73unqdJF1dmsA2R0efGXX2624X+YVxcAVWg@mail.gmail.com
1 parent 66d86d4 commit d9eb92c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/modules/worker_spi/worker_spi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,8 +370,8 @@ worker_spi_launch(PG_FUNCTION_ARGS)
370370
worker.bgw_restart_time = BGW_NEVER_RESTART;
371371
sprintf(worker.bgw_library_name, "worker_spi");
372372
sprintf(worker.bgw_function_name, "worker_spi_main");
373-
snprintf(worker.bgw_name, BGW_MAXLEN, "worker_spi worker %d", i);
374-
snprintf(worker.bgw_type, BGW_MAXLEN, "worker_spi");
373+
snprintf(worker.bgw_name, BGW_MAXLEN, "worker_spi dynamic worker %d", i);
374+
snprintf(worker.bgw_type, BGW_MAXLEN, "worker_spi dynamic");
375375
worker.bgw_main_arg = Int32GetDatum(i);
376376
/* set bgw_notify_pid so that we can use WaitForBackgroundWorkerStartup */
377377
worker.bgw_notify_pid = MyProcPid;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy