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 1rhh0R-00CrOH-CO for pgsql-hackers@arkaria.postgresql.org; Wed, 06 Mar 2024 02:27:44 +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 1rhh0P-004cTG-LK for pgsql-hackers@arkaria.postgresql.org; Wed, 06 Mar 2024 02:27:42 +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 1rhh0P-004cT8-7b for pgsql-hackers@lists.postgresql.org; Wed, 06 Mar 2024 02:27:41 +0000 Received: from mail.postgrespro.ru ([93.174.131.139]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rhh0L-002zi9-Ei for pgsql-hackers@lists.postgresql.org; Wed, 06 Mar 2024 02:27:41 +0000 Received: from [172.30.8.38] (unknown [172.30.8.38]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: a.lepikhov@postgrespro.ru) by mail.postgrespro.ru (Postfix/587) with ESMTPSA id 1FCC3E20E8E; Wed, 6 Mar 2024 05:27:03 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mx2023; t=1709692056; bh=7l6s3OR3dK66tCi3s9I4/QNIDa5rhxMruIpkBvV3BBs=; h=Message-ID:Date:User-Agent:Subject:To:Cc:References:From: In-Reply-To:From; b=4XYCaoGPdmfVwYQGhbu8aybfGIr4i2Bn+6TjbK0daVVN+4jo67jdEgLi5G7Y+nz/1 7vcFVj22WGdmy/14C0aIzKSMFbFuVhX7CrEJGHiKHX5fyXwksjAqKH+IceQI+VuyBb iWpIf66MoCodpM37qG4xhggEqBC+p15K4VN1Jlkqk8zywTxLNCcV3aF2hYjftw+pgf ObtVxrV7yXXnMsQqNkFKg8Aez6DWFxpo72BgcaThf8O9/7lae/lKZj4kHo05dwLPO/ qekf0zqnTrlRl0io/t2NAOUhXpGqO2UHax2VbzQaxyBIwicYZGaZ+H/1VmZsfi/tzN SzenIVdiTYYAw== Message-ID: <8aae908b-7e9d-4287-959d-18765f84c725@postgrespro.ru> Date: Wed, 6 Mar 2024 09:26:49 +0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Hooking into ExplainOneQuery() complicated by missing standard_ExplainOneQuery Content-Language: en-US To: Michael Paquier , Mats Kindahl Cc: Aleksander Alekseev , pgsql-hackers@lists.postgresql.org References: From: Andrei Lepikhov Organization: Postgres Professional In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 6/3/2024 06:25, Michael Paquier wrote: >> Just to elaborate: the intention was to allow a section to be added to >> every node in the plan containing information from further down and also >> allow this information to propagate upwards. We happen to have buffer >> information right now, but allowing something similar to be added >> dynamically by extending ExplainNode and passing down a callback to >> standard_ExplainOneQuery. > > Or an extra hook at the end of ExplainNode() to be able to append more > information at node level? Not sure if others would agree with that, > though. We already discussed EXPLAIN hooks, at least in [1]. IMO, extensions should have a chance to add something to the node explain and the summary, if only because they can significantly influence the planner and executor's behaviour. [1] https://www.postgresql.org/message-id/flat/6cd5caa7-06e1-4460-bf35-00a59da3f677%40garret.ru -- regards, Andrei Lepikhov Postgres Professional