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.96) (envelope-from ) id 1wcJLT-003Fi6-25 for pgsql-hackers@arkaria.postgresql.org; Wed, 24 Jun 2026 08:52:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wcJLS-00GSrF-0P for pgsql-hackers@arkaria.postgresql.org; Wed, 24 Jun 2026 08:52:30 +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.96) (envelope-from ) id 1wcJLR-00GSr7-2i for pgsql-hackers@lists.postgresql.org; Wed, 24 Jun 2026 08:52:29 +0000 Received: from fhigh-b7-smtp.messagingengine.com ([202.12.124.158]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wcJLQ-00000001tPJ-0PMr for pgsql-hackers@postgresql.org; Wed, 24 Jun 2026 08:52:28 +0000 Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailfhigh.stl.internal (Postfix) with ESMTP id BE4E57A01ED; Wed, 24 Jun 2026 04:52:26 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Wed, 24 Jun 2026 04:52:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; h=cc:cc:content-transfer-encoding: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=1782291146; x=1782377546; bh=SsFHc6s/SuJGIC35ePhH3Maz6n6NZej0 weXLqEJi3Ck=; b=DUN5rIqzCroRnfvPF0+xHUuO04JRxVhJMCoe9mPL2XZ7/C21 f+v8G48V5JDD9Fqip0Xne8Bo+BVR8kX6HKvOnU+lfSjO5TOVILrlD3GO5cI7+N33 x3M4gTdESWHl3c9+A6o5h5uA0vbJyYDFlrP7RHV5r590aVGaZ06STeTAzJcbETWh y7sH41pg/rSEnF0Gblr3sxYj1wisFB6yNUXfYSYP6zjeKLpgjkKmU8ObQWwYTfuN vlNgGUK2JoBou10mfsW+oPWlmYk6ZawKf9zrerS5mTIivUqrpA7Uo5BRSitP2dj0 b8nP7EeJS0KUNWkQY3DF4TwwCmcsTzHdCCo4Lw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :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-sender:x-me-sender:x-sasl-enc; s=fm1; t=1782291146; x= 1782377546; bh=SsFHc6s/SuJGIC35ePhH3Maz6n6NZej0weXLqEJi3Ck=; b=b vTFQ9lStspbivwI/FPpIZ86XqQGqNnyJroI1xuBHaP1DA051zMYQlfjDqzZAKY+A VgXsIyKs681248rxzLcl5Hm0DzQxwMwDEWFveJ78ZcF3Sv8pSXfb/Mm7tU6N/udF 3ujTOZRDoogmgCj61DffharUlaZouA6at6SFpiR9Xf4odlhcAtkGKvSI7BKyEfqS dVHKNKSqmNGWdw98cjmqa2XW27pnrar1xgkAzfTYCd5eniURD3qjuNqp8K56IhCI w7U8efeRa2r/z1nylBu0GqJPG383f02bH9kfpHTuVQiAzTaayEC21YZUTu2Xiyz0 oI0Ry4o4tKuaWN4dPO9FQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTF4D4TZpp02HbKjv2Z4Pjh02X05zpRyvXVOnDPh1vQ2au7wyU5JH66yFWTh5SCLLO ZvCfMB7+G1If9bxBx/6H+/hhr0M24G+Au96Uc6CxoItzg0g6HC1hUDqtI29zRGis5otUKm vEX0ukv1tUGPxWnYaUuFVqObZz/B4BCw1rYjmFPq+4eIxEwVYoHVCn4R4cgrWDBfaN+D4M BX93bXgtkZe193/i9iRPuW+JefoMbURlsL5CEl/rZh4Pg0Yt+cSGNveNGLnrRr/HLPsnlJ 89RQuzHSaJKkKv6J6tRM1y2ARDE2B95+ChstquyIHFTVNqjVxiMVdX59OibOProd0vhqWA NhTztBQI5wuJ0++P0K1ma1LMkDSrZyhZ3h6UZVfj9O8JEyqlw4G4ZhZEJhkzF+ecbM2vOZ wiPi512rs/+AwadaixBNb1XsW2eIarcVm1zimkzeSuG6RKqXk2P2fi+Ib71y4gVd9zU9Zy kA/bqx4FYHi5NUCiICidMHcqcyoQhd40XL/UfznTJ4I1Lz3B+QZn6xr8fKo7k2I2yBwJvI vvxSQzsD+4LZZVlMqfwyEWrIpTFTXtJUfPGsR3uFX5Ntvu97nRltpp8tvjhKgqReVUUvCu 1cmRRXn8AQxlv7711vjZaXyPm9EXqZO5FVWvgUkYT2R2xbC4wwneQs5/xPXw X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 24 Jun 2026 04:52:25 -0400 (EDT) Message-ID: <84f20d0d-3bc8-4843-bd7e-21bce20f8582@eisentraut.org> Date: Wed, 24 Jun 2026 10:52:24 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] Fix null pointer dereference in PG19 To: Paul A Jungwirth , jian he Cc: Tom Lane , Aleksander Alekseev , PostgreSQL Development References: <626986.1776785090@sss.pgh.pa.us> From: Peter Eisentraut Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 15.05.26 23:21, Paul A Jungwirth wrote: > On Thu, Apr 23, 2026 at 9:45 PM jian he wrote: >> >> On Tue, Apr 21, 2026 at 11:24 PM Tom Lane wrote: >>> >>> * I'd tend to move the anti-FDW check to execution too. >>> It's not actively wrong, since nowadays we don't permit >>> relations to change relkind, but it seems out of place. >>> Also, it seems inadequate to deal with the case of a target >>> that is a partitioned table having FDW partitions. >>> >> Hi. >> >> Instead of adding another subnode in CheckValidResultRel, >> I am passing ModifyTable to it, this will be more future-proof. > > Thank you for working on this! I started a new thread at [1] so that I > could give it a commitfest entry. > > Your patch looks great to me. I didn't notice that you had posted one, > so I made my own, but yours is better. Doing the check in > CheckValidResultRel makes a lot of sense. > > I thought there was one other case we should test for: when a > partition has a child FDW that gets pruned, we should not raise an > error. So I swapped in my own tests, which were otherwise similar to > yours. > > That new thread also includes a patch to move the functionality check > into plan-time. > > [1] https://www.postgresql.org/message-id/CA%2BrenyUte0_UJsJiDJQi82oaBsMJn%3Dcct0Wn%3DvOqXtuDn%3DYYJA%40mail.gmail.com I don't understand the status of this discussion. The original bug report is related to views and INSTEAD OF triggers. But the last few patches that have been posted here appear to be unrelated to that specific issue.