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 1ra9cd-008KBf-8K for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Feb 2024 07:23:59 +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 1ra9cb-004YbA-Sk for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Feb 2024 07:23:57 +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 1ra9cb-004Yb2-JQ for pgsql-hackers@lists.postgresql.org; Wed, 14 Feb 2024 07:23:57 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ra9cZ-0077IB-Pa for pgsql-hackers@lists.postgresql.org; Wed, 14 Feb 2024 07:23:57 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 2280D5C0087; Wed, 14 Feb 2024 02:23:53 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Wed, 14 Feb 2024 02:23:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1707895433; x=1707981833; bh=2iYHAm54Vz lzb/GlzIE9UvF9kUoT5FhbEKVbgJrQTGw=; b=d5+AZat4SRgfXnb/wCcsCszbNC CFCI9jiU8IaRvuj8YB3I6W4BVwXTrkTPQ2HQamkFqlTo15W0KhOzdb/MjB21GNht eRbJX7e0RgS8m1QknQe9N7NAVFI+rCUpZIQMaXnKLE4W/G9qKwNIeTWISjxLVDmp wb7sw7upqxjdlV5FaVErwaPwsEM1Iz2k2G0IOldOXZCoeTa1Nd2PzPOVoftw8IPs DvGPTVr6OYtdj19X93dMNS4BOVN56yHDnWe9RzjFxA97OvB+UqrVMpXFCsxCZAYA LPDc/Q2VKxPkAC8Ad1G7n98SWBM3a4f7cODuuvET7oXYvED7tk8UOWBUY8Ww== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1707895433; x=1707981833; bh=2iYHAm54Vzlzb/GlzIE9UvF9kUoT 5FhbEKVbgJrQTGw=; b=vk2J5aOKnbHWpn8k68WvYzG5d6p63Rv32CqRokF+pGLK 5QHxkxDnTOM3ZGu2/vIoUtOuOfKebwnEEWDHgz59hELPWZAGOcvwHiKJu32m/yWu d8uBuXm+FXrhPS8BDUTYTovtEGA19sBh5uohq+qYVVuUPlVS/HEQwb71ktz7mqC1 REZQzNaKQQ8pkty1ORZUFTUQznj4XtsIY33YHRBrw7Wv2aiU16wWRZuci4lKU53T nXpPdpGbVDeUK1FoRy9x2WDe4qFVJg/Y8Tr+vUrQ6E/Zd3NmCBTCLmGtwr1GzyDS CtCZQFH+yH/Zy1lobkQMJyWAcSySDAN6A8C+dzp0rA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudeigddutdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdlfeehmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepgeffjeevgfevuddvjedtvddt ieejheduueelvddufedtgfefjedvkeevkeeivddvnecuffhomhgrihhnpehpohhsthhgrh gvshhqlhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhl fhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 14 Feb 2024 02:23:51 -0500 (EST) Date: Wed, 14 Feb 2024 16:23:38 +0900 From: Michael Paquier To: torikoshia Cc: Melih Mutlu , Andres Freund , Stephen Frost , PostgreSQL Hackers Subject: Re: Parent/child context relation in pg_get_backend_memory_contexts() Message-ID: References: <20231012162309.4wmc2nb5tkt6pzml@awork3.anarazel.de> <2f34c14847fc03752f0bca7d97aeae27@oss.nttdata.com> <18d210bb7010f87cdb0019fa846d45ea@oss.nttdata.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="WOnxPxxYRPOcCzw9" Content-Disposition: inline In-Reply-To: <18d210bb7010f87cdb0019fa846d45ea@oss.nttdata.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --WOnxPxxYRPOcCzw9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Jan 19, 2024 at 05:41:45PM +0900, torikoshia wrote: > We already have additional description below the table which explains each > column of the system view. For example pg_locks: > https://www.postgresql.org/docs/devel/view-pg-locks.html I was reading the patch, and using int[] as a representation of the path of context IDs up to the top-most parent looks a bit strange to me, with the relationship between each parent -> child being preserved, visibly, based on the order of the elements in this array made of temporary IDs compiled on-the-fly during the function execution. Am I the only one finding that a bit strange? Could it be better to use a different data type for this path and perhaps switch to the names of the contexts involved? It is possible to retrieve this information some WITH RECURSIVE as well, as mentioned upthread. Perhaps we could consider documenting these tricks? -- Michael --WOnxPxxYRPOcCzw9 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmXManoACgkQnvQgOdby QH1+Ow//fImh4HtVIsyCt6O+lCljWHOoYpfxwL4fy+GM5gUus/Ck3nUVoInuagux r61Czqa1pEV3fZ2nNSU5AZyctVfSBY3iqrr6VA43wWqlMhN5VdEYPfG178zpcSO/ IJzjnzzfA9iRKbCYsbNEbThXt58xk0RrqYju0AOMZ6gL4VlbcI5nSxQMjPfoKzOX qNWi8qEKa1mMbQUKZgrtT+r9vRcsH7fOx5BO7/f7+ukmIFfZ3YGfk+t2qo4nhq+z guvApwtaI0bw4GebBNh1j7yVnlEC5tjaSMjFLfB6jNcjTHiykQGHQng/cz928tfJ VZrg/yFEXV2u7A79EkErbQYaBhboVMXYRxdVNQ4n2tHaalKVUHh/XRiABb8RoXMW lA6ljEd+pCizLzsH7odH6ANCDgTaPmVOwhTySoFexb2Iq5YMu8YV1VrTeC97wK/k Q7uOItjhNnND/Dfnf/PfonZtxnJgXcyicze5c/id1BLtj6OTjfB7CYjhflvWRVu1 /3LUbwhYUgzfmm8LD7oWZtvudyojovRj3GIZ55uASUfs2eIk5gfb/R0zK4UAQGT+ O8I5fIhRneOMx4jR+eUQyhfG+m3xII0nXInm23I9AqUlsVrZMgezWP7kQHz3WpV+ 73u84l1N3onb3M8XL9GEJLq4u4gKmvP4MQN2qXSaKA/eAPT67Qg= =Mvcp -----END PGP SIGNATURE----- --WOnxPxxYRPOcCzw9--