aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2020-08-03 13:38:48 +0900
committerMichael Paquier <michael@paquier.xyz>2020-08-03 13:38:48 +0900
commitb8fdee7d0ca8bd2165d46fb1468f75571b706a01 (patch)
treec3e2c5de65e71797c71de1b8b02a75c695acf14f /doc/src
parentf44b9b625bedd8e0bca67b3b42ba10ce482fa31b (diff)
downloadpostgresql-b8fdee7d0ca8bd2165d46fb1468f75571b706a01.tar.gz
postgresql-b8fdee7d0ca8bd2165d46fb1468f75571b706a01.zip
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
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/config.sgml9
1 files changed, 8 insertions, 1 deletions
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 994155ca00e..7a7177c5508 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -6695,6 +6695,12 @@ local0.* /var/log/postgresql
<entry>no</entry>
</row>
<row>
+ <entry><literal>%P</literal></entry>
+ <entry>Process ID of the parallel group leader, if this process
+ is a parallel query worker</entry>
+ <entry>no</entry>
+ </row>
+ <row>
<entry><literal>%t</literal></entry>
<entry>Time stamp without milliseconds</entry>
<entry>no</entry>
@@ -7026,7 +7032,7 @@ log_line_prefix = '%m [%p] %q%u@%d/%a '
character count of the error position therein,
location of the error in the PostgreSQL source code
(if <varname>log_error_verbosity</varname> is set to <literal>verbose</literal>),
- application name, and backend type.
+ application name, backend type, and process ID of parallel group leader.
Here is a sample table definition for storing CSV-format log output:
<programlisting>
@@ -7056,6 +7062,7 @@ CREATE TABLE postgres_log
location text,
application_name text,
backend_type text,
+ leader_pid integer,
PRIMARY KEY (session_id, session_line_num)
);
</programlisting>