Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tUqXl-003F1F-IW for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Jan 2025 17:05:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tUqWl-00ATBm-UU for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Jan 2025 17:04:31 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tUqWl-00ATBe-KP for pgsql-hackers@lists.postgresql.org; Mon, 06 Jan 2025 17:04:31 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tUqWg-000C7H-1j for pgsql-hackers@postgresql.org; Mon, 06 Jan 2025 17:04:30 +0000 Received: from [192.168.11.6] (p4062048-ipxg13601funabasi.chiba.ocn.ne.jp [153.216.203.48]) by oss.nttdata.com (Postfix) with ESMTPSA id E212E607D0; Tue, 7 Jan 2025 02:04:20 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at oss.nttdata.com Message-ID: Date: Tue, 7 Jan 2025 02:04:20 +0900 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Enhancing Memory Context Statistics Reporting To: Rahila Syed , torikoshia Cc: PostgreSQL-development References: <202411141148.vqxmwtn2ln25@alvherre.pgsql> <7d4db5cf-8d72-4ee1-8f2e-f88ef9615f27@vondra.me> <637b3ae3-b9eb-4d83-a942-5f7483911ea4@vondra.me> <29ced66e28ec696d1ac29747bd901df2@oss.nttdata.com> Content-Language: en-US From: Fujii Masao In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2025/01/06 22:16, Rahila Syed wrote: > PFA the patch with above updates. Thanks for updating the patch! I like this feature. I tested this feature and encountered two issues: Issue 1: Error with pg_get_process_memory_contexts() When I used pg_get_process_memory_contexts() on the PID of a backend process that had just caused an error but hadn’t rolled back yet, the following error occurred: Session 1 (PID=70011): =# begin; =# select 1/0; ERROR: division by zero Session 2: =# select * from pg_get_process_memory_contexts(70011, false); Session 1 terminated with: ERROR: ResourceOwnerEnlarge called after release started FATAL: terminating connection because protocol synchronization was lost Issue 2: Segmentation Fault When I ran pg_get_process_memory_contexts() every 0.1 seconds using \watch command while running "make -j 4 installcheck-world", I encountered a segmentation fault: LOG: client backend (PID 97975) was terminated by signal 11: Segmentation fault: 11 DETAIL: Failed process was running: select infinite_recurse(); LOG: terminating any other active server processes Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION