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 1kkd8X-0005wE-8T for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Dec 2020 01:10:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kkd8W-0001cN-87 for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Dec 2020 01:10:20 +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 1kkd8W-0001cG-1C for pgsql-hackers@lists.postgresql.org; Thu, 03 Dec 2020 01:10:20 +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 1kkd8O-0000g5-Vp for pgsql-hackers@postgresql.org; Thu, 03 Dec 2020 01:10:19 +0000 Received: from hnk.local (p1295030-ipngn4902funabasi.chiba.ocn.ne.jp [153.166.85.30]) by oss.nttdata.com (Postfix) with ESMTPSA id 8AD9F6272B; Thu, 3 Dec 2020 10:10:07 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.3 at oss.nttdata.com Subject: Re: Get memory contexts of an arbitrary backend process To: torikoshia , Georgios Kokolatos Cc: pgsql-hackers@postgresql.org References: <0271f440ac77f2a4180e0e56ebd944d1@oss.nttdata.com> <270ec80dbbebfb5c6f2b9fdd7a7858b5@oss.nttdata.com> <160502083340.7362.4386116585349115146.pgcf@coridan.postgresql.org> <064d510f2d33edc37dfd6b8f3b6bd30e@oss.nttdata.com> From: Fujii Masao Message-ID: Date: Thu, 3 Dec 2020 10:10:06 +0900 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: <064d510f2d33edc37dfd6b8f3b6bd30e@oss.nttdata.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020/11/16 19:58, torikoshia wrote: > On 2020-10-28 15:32, torikoshia wrote: >> On 2020-10-23 13:46, Kyotaro Horiguchi wrote: > >>> I think we might need to step-back to basic design of this feature >>> since this patch seems to have unhandled corner cases that are >>> difficult to find. > > I've written out the basic design below and attached > corresponding patch. I'm starting to study how this feature behaves. At first, when I executed the following query, the function never returned. ISTM that since the autovacuum launcher cannot respond to the request of memory contexts dump, the function keeps waiting infinity. Is this a bug? Probably we should exclude non-backend proceses from the target processes to dump? Sorry if this was already discussed. SELECT pg_get_backend_memory_contexts(pid) FROM pg_stat_activity; Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION