Re: expose parallel leader in CSV and log_line_prefix

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>, Justin Pryzby <pryzby@telsasoft.com>, Julien Rouhaud <rjuju123@gmail.com>, Tomas Vondra <tomas.vondra@2ndquadrant.com>, pgsql-hackers@postgresql.org
Date: 2020-07-23T00:59:04Z
Lists: pgsql-hackers
Michael Paquier <michael@paquier.xyz> writes:
> On Wed, Jul 22, 2020 at 11:36:05AM -0400, Alvaro Herrera wrote:
>> How about we combine both.  "Process ID of the parallel group leader, if
>> this process is a parallel query worker.  NULL if this process is a
>> parallel group leader or does not participate in parallel query".

> Sounds fine to me.  Thanks.
> Do others have any objections with this wording?

Is "NULL" really le mot juste here?  If we're talking about text strings,
as the thread title implies (I've not read the patch), then I think you
should say "empty string", because the SQL concept of null doesn't apply.

			regards, tom lane



Commits

  1. Add %P to log_line_prefix for parallel group leader

  2. Tweak behavior of pg_stat_activity.leader_pid

  3. Add leader_pid to pg_stat_activity