pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Julien Rouhaud <rjuju123@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: Sergei Kornilov <sk@zsrv.org>
Cc: Guillaume Lelarge <guillaume@lelarge.info>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Expose lock group leader pid in pg_stat_activity
Date: Thu, 6 Feb 2020 09:23:33 +0100
Message-ID: <20200206082333.GA95343@nol> (raw)
In-Reply-To: <20200206002416.GD23913@paquier.xyz>
References: <20200118025102.GB230692@paquier.xyz>
	<CAOBaU_Z6WcT8FJfcCMU_Bp+PTzUpTEY9BfBQE4gbGKpE5wpfwQ@mail.gmail.com>
	<20200128130910.anay3mlhaminob6w@development>
	<CAOBaU_YpsBA2puV8NtjV_Oit2jbt=wnNSA_2E41kGUi_BhA8rA@mail.gmail.com>
	<20200128135208.6tnr72gamv2dr262@development>
	<20200130130301.GC130922@paquier.xyz>
	<20200204142725.GA30965@nol>
	<20200205014831.GC23913@paquier.xyz>
	<20200205065720.GA31242@nol>
	<20200206002416.GD23913@paquier.xyz>

On Thu, Feb 06, 2020 at 09:24:16AM +0900, Michael Paquier wrote:
> On Wed, Feb 05, 2020 at 07:57:20AM +0100, Julien Rouhaud wrote:
> > This looks good, thanks a lot!
> 
> Thanks for double-checking.  And done.

Thanks!

While on the topic, is there any reason why the backend stays a group leader
for the rest of its lifetime, and should we change that?

Also, while reading ProcKill, I noticed a typo in a comment:

    /*
     * Detach from any lock group of which we are a member.  If the leader
-    * exist before all other group members, it's PGPROC will remain allocated
+    * exist before all other group members, its PGPROC will remain allocated
     * until the last group process exits; that process must return the
     * leader's PGPROC to the appropriate list.
     */
diff --git a/src/backend/storage/lmgr/proc.c b/src/backend/storage/lmgr/proc.c
index 32df8c85a1..eb321f72ea 100644
--- a/src/backend/storage/lmgr/proc.c
+++ b/src/backend/storage/lmgr/proc.c
@@ -851,7 +851,7 @@ ProcKill(int code, Datum arg)
 
 	/*
 	 * Detach from any lock group of which we are a member.  If the leader
-	 * exist before all other group members, it's PGPROC will remain allocated
+	 * exist before all other group members, its PGPROC will remain allocated
 	 * until the last group process exits; that process must return the
 	 * leader's PGPROC to the appropriate list.
 	 */

Attachments:

  [text/plain] prockill-typo.diff (595B, ../20200206082333.GA95343@nol/2-prockill-typo.diff)
  download | inline diff:
diff --git a/src/backend/storage/lmgr/proc.c b/src/backend/storage/lmgr/proc.c
index 32df8c85a1..eb321f72ea 100644
--- a/src/backend/storage/lmgr/proc.c
+++ b/src/backend/storage/lmgr/proc.c
@@ -851,7 +851,7 @@ ProcKill(int code, Datum arg)
 
 	/*
 	 * Detach from any lock group of which we are a member.  If the leader
-	 * exist before all other group members, it's PGPROC will remain allocated
+	 * exist before all other group members, its PGPROC will remain allocated
 	 * until the last group process exits; that process must return the
 	 * leader's PGPROC to the appropriate list.
 	 */

view thread (30+ messages)  latest in thread

Message-ID: <20200206082333.GA95343@nol>
Permalink:  ../20200206082333.GA95343@nol/
Also on:    postgresql.org/message-id/20200206082333.GA95343@nol

 ·  · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: rjuju123@gmail.com, michael@paquier.xyz, tomas.vondra@2ndquadrant.com, sk@zsrv.org, guillaume@lelarge.info, pgsql-hackers@lists.postgresql.org
  Subject: Re: Expose lock group leader pid in pg_stat_activity
  In-Reply-To: <20200206082333.GA95343@nol>

* 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