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 1u5QDa-0001ED-0u for pgsql-hackers@arkaria.postgresql.org; Thu, 17 Apr 2025 14:27:54 +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 1u5QDX-009Qbf-7m for pgsql-hackers@arkaria.postgresql.org; Thu, 17 Apr 2025 14:27:52 +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 1u5QDW-009QbX-Tk for pgsql-hackers@lists.postgresql.org; Thu, 17 Apr 2025 14:27:51 +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 1u5QDT-000aAi-2N for pgsql-hackers@postgresql.org; Thu, 17 Apr 2025 14:27:51 +0000 Received: from oss.nttdata.com (localhost [127.0.0.1]) by oss.nttdata.com (Postfix) with ESMTPA id 29A216095B; Thu, 17 Apr 2025 23:27:43 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at oss.nttdata.com MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 17 Apr 2025 23:27:42 +0900 From: torikoshia To: Rahila Syed , m.melihmutlu@gmail.com Cc: PostgreSQL Hackers Subject: Re: Align memory context level numbering in pg_log_backend_memory_contexts() In-Reply-To: References: <395ea5d4fe190480efa95bf533485c70@oss.nttdata.com> <81B10568-B4A1-46C0-9809-2F8E06AB8C7B@yesql.se> User-Agent: Roundcube Webmail/1.4.11 Message-ID: X-Sender: torikoshia@oss.nttdata.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Thanks for your review, Melih and Rahila. On 2025-04-17 21:25, Rahila Syed wrote: > Hi, > >> The attached patch is how I think we should do it. > > Thank you for the patch. > I tested this patch and it works fine. I agree with the changes made > in it. > > Regarding v2 patch, > - int level = 0; > > Retaining the level variable will enhance the code readability, IMO. As for the level variable, this change comes from the v1 patch, and I don't have a strong opinion about it. However, if we decide to keep the level variable here, it might be more consistent to also define it in MemoryContextStatsDetail(). -- Regards, -- Atsushi Torikoshi Seconded from NTT DATA GROUP CORPORATION to SRA OSS K.K.