]> granicus.if.org Git - postgresql/commit
Add background worker type
authorPeter Eisentraut <peter_e@gmx.net>
Thu, 31 Aug 2017 16:24:47 +0000 (12:24 -0400)
committerPeter Eisentraut <peter_e@gmx.net>
Fri, 29 Sep 2017 15:08:24 +0000 (11:08 -0400)
commit5373bc2a0867048bb78f93aede54ac1309b5e227
treea330b6841f88d58831746b8d82e206174234a509
parent8b304b8b72b0a60f1968d39f01cf817c8df863ec
Add background worker type

Add bgw_type field to background worker structure.  It is intended to be
set to the same value for all workers of the same type, so they can be
grouped in pg_stat_activity, for example.

The backend_type column in pg_stat_activity now shows bgw_type for a
background worker.  The ps listing also no longer calls out that a
process is a background worker but just show the bgw_type.  That way,
being a background worker is more of an implementation detail now that
is not shown to the user.  However, most log messages still refer to
'background worker "%s"'; otherwise constructing sensible and
translatable log messages would become tricky.

Reviewed-by: Michael Paquier <michael.paquier@gmail.com>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
contrib/pg_prewarm/autoprewarm.c
doc/src/sgml/bgworker.sgml
src/backend/access/transam/parallel.c
src/backend/postmaster/bgworker.c
src/backend/postmaster/postmaster.c
src/backend/replication/logical/launcher.c
src/backend/utils/adt/pgstatfuncs.c
src/include/postmaster/bgworker.h
src/test/modules/test_shm_mq/setup.c
src/test/modules/worker_spi/worker_spi.c