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 1rA0ns-0046VM-0j for pgsql-hackers@arkaria.postgresql.org; Mon, 04 Dec 2023 04:43:32 +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 1rA0nn-00Eexk-FI for pgsql-hackers@arkaria.postgresql.org; Mon, 04 Dec 2023 04:43:27 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rA0nn-00Eexc-5p for pgsql-hackers@lists.postgresql.org; Mon, 04 Dec 2023 04:43:27 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rA0nj-008gst-Gx for pgsql-hackers@lists.postgresql.org; Mon, 04 Dec 2023 04:43:25 +0000 Received: from oss.nttdata.com (localhost [127.0.0.1]) by oss.nttdata.com (Postfix) with ESMTPA id 169226102E; Mon, 4 Dec 2023 13:43:18 +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: Mon, 04 Dec 2023 13:43:18 +0900 From: torikoshia To: Melih Mutlu Cc: Andres Freund , Stephen Frost , PostgreSQL Hackers Subject: Re: Parent/child context relation in pg_get_backend_memory_contexts() In-Reply-To: References: <20231012162309.4wmc2nb5tkt6pzml@awork3.anarazel.de> User-Agent: Roundcube Webmail/1.4.11 Message-ID: <2f34c14847fc03752f0bca7d97aeae27@oss.nttdata.com> X-Sender: torikoshia@oss.nttdata.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Thanks for working on this improvement! On 2023-10-23 21:02, Melih Mutlu wrote: > Hi, > > Thanks for reviewing. > Attached the updated patch v3. I reviewed v3 patch and here are some minor comments: > + > + role="column_definition"> > + path int4 Should 'int4' be 'int4[]'? Other system catalog columns such as pg_groups.grolist distinguish whther the type is a array or not. > + Path to reach the current context from TopMemoryContext. > Context ids in > + this list represents all parents of the current context. This > can be > + used to build the parent and child relation. It seems last "." is not necessary considering other explanations for each field end without it. + const char *parent, int level, int *context_id, + List *path, Size *total_bytes_inc_chidlren) 'chidlren' -> 'children' + elog(LOG, "pg_get_backend_memory_contexts called"); Is this message necessary? There was warning when applying the patch: % git apply ../patch/pg_backend_memory_context_refine/v3-0001-Adding-id-parent_id-into-pg_backend_memory_contex.patch ../patch/pg_backend_memory_context_refine/v3-0001-Adding-id-parent_id-into-pg_backend_memory_contex.patch:282: trailing whitespace. select count(*) > 0 ../patch/pg_backend_memory_context_refine/v3-0001-Adding-id-parent_id-into-pg_backend_memory_contex.patch:283: trailing whitespace. from contexts warning: 2 lines add whitespace errors. -- Regards, -- Atsushi Torikoshi NTT DATA Group Corporation