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 1roweV-004FX0-IH for pgsql-hackers@arkaria.postgresql.org; Tue, 26 Mar 2024 02:35:04 +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 1roweU-00A54O-60 for pgsql-hackers@arkaria.postgresql.org; Tue, 26 Mar 2024 02:35:02 +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 1roweS-00A54F-Gp for pgsql-hackers@lists.postgresql.org; Tue, 26 Mar 2024 02:35:02 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1roweK-006Vcy-9o for pgsql-hackers@lists.postgresql.org; Tue, 26 Mar 2024 02:35:00 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id E6E5E5C0046; Mon, 25 Mar 2024 22:34:49 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Mon, 25 Mar 2024 22:34:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; 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=fm2; t=1711420489; x=1711506889; bh=za7iJI/EPo pqu1h4m/Bo/CLdDQcvXJgBCGOBSpQQzps=; b=k8ATyNd3Q+5g8SlYY8uSESWNM3 6Stb9LbyBSHtYsYBoLy4lvaqb4jzmH9vEcxt07yYOwJ14rH1hxYh9aEEEHLfEZ1F XQhRdiiVZc14eeUvf3qBpJScLq6bFji9N1G5R2YGM/BnxnWU7TKg6I0OOHgxjk0n E63w4XGTtOSQea1JbsS7RPPqG/4c5Oqqz3uamMZ/k5ASM8f4HVf6jrlwmRh2JeSv PEggJB4lvQjklg8ja/omuXs/cop7Jnl8YETz4jc40s7EZOTn4sfT8YXuEqoZqO4f T3+RbvZZuu2dks7FuyuuV4i4uvej+vlfFHud32iS3buVyv0/XvMh8SxqcPPA== 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= fm2; t=1711420489; x=1711506889; bh=za7iJI/EPopqu1h4m/Bo/CLdDQcv XJgBCGOBSpQQzps=; b=PDDE/sH16qw0ZQO6P8OTAt4jbbR1caFSBLnGTDErWXl9 PFSYx7Ye1wOnwzbUcYiVYIRdDyVKNjlaJ+Z63MUbVe6SnI5DYzwaX9CwQdx4wI46 yqyyqW5dgGYF9BNaurxc+472AS722vhci/SptR5AQUplLivLcyiihrAu3slQ6wRz 5zKdBP9cD6zad1CRv9NME28It505v25f20Nk5vt7AWKvllOna9Dv9hgKcHMqf+Gi jdDmboU057sAtGwKrWMNct2oLu8y4ZG/0HYOfZ7/yl/ag0rDia7xdawDW38T+knt 9Je9NAVMOlmhx2HJstT9Bg3eMvKcIy7CEDvCCWb6Ow== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudduvddggeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughr vghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrf grthhtvghrnhepvdfffeevhfetveffgeeiteefhfdtvdffjeevhfeuteegleduheetvedu ieettddunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh eprghnughrvghssegrnhgrrhgriigvlhdruggv X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 25 Mar 2024 22:34:48 -0400 (EDT) Date: Mon, 25 Mar 2024 19:34:47 -0700 From: Andres Freund To: Robert Haas Cc: torikoshia , pgsql-hackers@lists.postgresql.org, James Coleman , Julien Rouhaud , =?utf-8?Q?=C3=89tienne?= BERSAC , ashutosh.bapat.oss@gmail.com, rafaelthca@gmail.com, jian.universality@gmail.com Subject: Re: RFC: Logging plan of the running query Message-ID: <20240326023447.yj5fi5qcbz5ocyrt@awork3.anarazel.de> References: <2c9a3fd390d653f1829b795d0bad4653@oss.nttdata.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2024-03-13 15:33:02 -0400, Robert Haas wrote: > But also ... having to wrap the entire plan tree like this seems > pretty awful. I don't really like the idea of a large-scan plan > modification like this in the middle of the query. It's not great. But I also don't really see an alternative with this approach. I guess we could invent a new CFI version that gets the current PlanState and use that in all of src/backend/executor/node* and pass the PlanState to that - but then we could just as well just directly process the interrupt there. > I also wonder whether it interacts properly with JIT. I don't think there's a problem unless somebody invests a lot of time in JITing much more of the query. Which will require a lot more work, basically redesigning the executor... > Andres, did you have some clever idea for this feature that would > avoid the need to do this? No. I think it's acceptable though. However it might be worth inventing an executor tree walker in a preliminary step. We have already quite a few switches over all plan nodes, which we could largely replace with a helper. Greetings, Andres Freund