diff options
author | Michael Paquier <michael@paquier.xyz> | 2023-07-26 12:43:26 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2023-07-26 12:43:26 +0900 |
commit | d9eb92c7b122c4cf40e95ec45e88b27b318a2be9 (patch) | |
tree | 44366e406fdaa14ef0b83f3d7272136478904e03 /src | |
parent | 66d86d4201b3a4b05c6d7d1bf827d4b17aa44a06 (diff) | |
download | postgresql-d9eb92c7b122c4cf40e95ec45e88b27b318a2be9.tar.gz postgresql-d9eb92c7b122c4cf40e95ec45e88b27b318a2be9.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/test/modules/worker_spi/worker_spi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/modules/worker_spi/worker_spi.c b/src/test/modules/worker_spi/worker_spi.c index ada0fb8ac73..903dcddef97 100644 --- a/src/test/modules/worker_spi/worker_spi.c +++ b/src/test/modules/worker_spi/worker_spi.c @@ -370,8 +370,8 @@ worker_spi_launch(PG_FUNCTION_ARGS) worker.bgw_restart_time = BGW_NEVER_RESTART; sprintf(worker.bgw_library_name, "worker_spi"); sprintf(worker.bgw_function_name, "worker_spi_main"); - snprintf(worker.bgw_name, BGW_MAXLEN, "worker_spi worker %d", i); - snprintf(worker.bgw_type, BGW_MAXLEN, "worker_spi"); + snprintf(worker.bgw_name, BGW_MAXLEN, "worker_spi dynamic worker %d", i); + snprintf(worker.bgw_type, BGW_MAXLEN, "worker_spi dynamic"); worker.bgw_main_arg = Int32GetDatum(i); /* set bgw_notify_pid so that we can use WaitForBackgroundWorkerStartup */ worker.bgw_notify_pid = MyProcPid; |