Add %P to log_line_prefix for parallel group leader
authorMichael Paquier <michael@paquier.xyz>
Mon, 3 Aug 2020 04:38:48 +0000 (13:38 +0900)
committerMichael Paquier <michael@paquier.xyz>
Mon, 3 Aug 2020 04:38:48 +0000 (13:38 +0900)
commitb8fdee7d0ca8bd2165d46fb1468f75571b706a01
treec3e2c5de65e71797c71de1b8b02a75c695acf14f
parentf44b9b625bedd8e0bca67b3b42ba10ce482fa31b
Add %P to log_line_prefix for parallel group leader

This is useful for monitoring purposes with log parsing.  Similarly to
pg_stat_activity, the leader's PID is shown only for active parallel
workers, minimizing the log footprint for the leaders as the equivalent
shared memory field is set as long as a backend is alive.

Author: Justin Pryzby
Reviewed-by: Álvaro Herrera, Michael Paquier, Julien Rouhaud, Tom Lane
Discussion: https://postgr.es/m/20200315111831.GA21492@telsasoft.com
doc/src/sgml/config.sgml
src/backend/utils/error/elog.c
src/backend/utils/misc/postgresql.conf.sample