Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lTaxq-0006Om-1s for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Apr 2021 01:57:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lTaxo-0007Uh-VI for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Apr 2021 01:57:08 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lTaxo-0007Ua-OD for pgsql-hackers@lists.postgresql.org; Tue, 06 Apr 2021 01:57:08 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lTaxm-0000fF-2V for pgsql-hackers@postgresql.org; Tue, 06 Apr 2021 01:57:08 +0000 Received: from oss.nttdata.com (localhost [127.0.0.1]) by oss.nttdata.com (Postfix) with ESMTP id 2FDF5627EC; Tue, 6 Apr 2021 10:57:01 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.3 at oss.nttdata.com MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Tue, 06 Apr 2021 10:57:01 +0900 From: torikoshia To: Fujii Masao Cc: Zhihong Yu , Kyotaro Horiguchi , PostgreSQL-development , Tom Lane , gkokolatos@protonmail.com, kasahara.tatsuhito@gmail.com, Craig Ringer Subject: Re: Get memory contexts of an arbitrary backend process In-Reply-To: References: <1f259e90-08c8-2202-be66-f7ee05d22cd2@oss.nttdata.com> <20210331.151612.259240960686480846.horikyota.ntt@gmail.com> <65fbf059-bcff-1585-59a1-1ec6a6f5ac75@oss.nttdata.com> <6ab7b7f1-8dca-288f-5578-0a0716567341@oss.nttdata.com> Message-ID: <8205c0edb46ae848bcf07635ac2cc7ee@oss.nttdata.com> X-Sender: torikoshia@oss.nttdata.com User-Agent: Roundcube Webmail/1.1.9 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021-04-06 00:08, Fujii Masao wrote: > On 2021/04/05 21:03, torikoshia wrote: >> On 2021-04-05 12:59, Fujii Masao wrote: >>> On 2021/04/05 12:20, Zhihong Yu wrote: >> >> Thanks for reviewing! >> >>>> + * On receipt of this signal, a backend sets the flag in the signal >>>> + * handler, and then which causes the next CHECK_FOR_INTERRUPTS() >> >>>> I think the 'and then' is not needed: >> >> Although I wonder either would be fine, removed the words. >> >>>> +        * This is just a warning so a loop-through-resultset will >>>> not abort >>>> +        * if one backend logged its memory contexts during the run. >>>> >>>> The pid given by arg 0 is not a PostgreSQL server process. Which >>>> other backend could it be ? >>> >>> This is the comment that I added wrongly. So the comment should be >>> "This is just a warning so a loop-through-resultset will not abort >>> if one backend terminated on its own during the run.", >>> like pg_signal_backend(). Thought? >> >> +1. >> >> Attached v10 patch. > > Thanks for updating the patch! > > I updated the patch as follows. Could you check the attached patch? Thanks a lot! I don't have any objections to your improvements. Regards,