From: Peter Eisentraut <peter_e@gmx.net>
To: pgsql-committers@postgresql.org
Subject: pgsql: Add background worker type
Date: Fri, 29 Sep 2017 15:11:40 +0000
Message-ID: <E1dxwx2-0003aK-Sf@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
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>
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/5373bc2a0867048bb78f93aede54ac1309b5e227
Modified Files
--------------
contrib/pg_prewarm/autoprewarm.c | 6 ++--
doc/src/sgml/bgworker.sgml | 11 +++++--
src/backend/access/transam/parallel.c | 1 +
src/backend/postmaster/bgworker.c | 51 +++++++++++++++++++++++++++---
src/backend/postmaster/postmaster.c | 5 +--
src/backend/replication/logical/launcher.c | 3 ++
src/backend/utils/adt/pgstatfuncs.c | 16 ++++++++--
src/include/postmaster/bgworker.h | 2 ++
src/test/modules/test_shm_mq/setup.c | 2 +-
src/test/modules/worker_spi/worker_spi.c | 8 +++--
10 files changed, 89 insertions(+), 16 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: peter_e@gmx.net
Subject: Re: pgsql: Add background worker type
In-Reply-To: <E1dxwx2-0003aK-Sf@gemulon.postgresql.org>
References: <E1dxwx2-0003aK-Sf@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox