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 1whkB5-000OWf-2v for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Jul 2026 08:32:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1whkB4-00BvuE-10 for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Jul 2026 08:32:15 +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 1whkB4-00Bvu4-07 for pgsql-hackers@lists.postgresql.org; Thu, 09 Jul 2026 08:32:14 +0000 Received: from fhigh-b4-smtp.messagingengine.com ([202.12.124.155]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1whkB2-00000000Hy9-3MiD for pgsql-hackers@postgresql.org; Thu, 09 Jul 2026 08:32:13 +0000 Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfhigh.stl.internal (Postfix) with ESMTP id 4D80C7A0070; Thu, 9 Jul 2026 04:32:11 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Thu, 09 Jul 2026 04:32:11 -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=fm1; t=1783585931; x=1783672331; bh=BIvjAbYuVftizpW5ypSsB1sCL3IrtYLz h/t7W8pdA0c=; b=ivaQV/BY2sj3ON++NeAV24HSdn2s+WPrN965LbHypmUvEPBz QfgZC/VoOqZEJxsUM833KLwH9bCDPvJr9A6oIbCc1QyRP6V2ppgErSHtTh0TC8wJ hnqRYaocKdoandqTr01DwaqPVadEcyhwE1lSf7mrOvaEEp9ClQp3c7G60b8GSQlf nLCLmz/bEVBY+KE6I+84rtWPi8EFZ4Rj7HXQKGoSaFS9/swntOEU6QF1OD0KE5X5 fCN5+Nw/mxouQfnC5KdsWwM8UAk8gud5LltfPGb47obiSbbjNoMr3Jnb1T6f+kVz 9ZuWNQggwCgFdMnq5LdBz040di/H5j+dswp2rg== 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=fm2; t=1783585931; x= 1783672331; bh=BIvjAbYuVftizpW5ypSsB1sCL3IrtYLzh/t7W8pdA0c=; b=c CwMAKIkz8HQtpaNZijd0GjvL902rQEL4WeD3oIN/QcjV46HyltmaGdwviAehgHI5 BbX40y7EyCU1/QRLo2UXyllrsK+gQKaw24k4Hgf2UpK7X37OOSJmoA2zXcgjBHWf QEXSkOzeOypDqwK+/YZt9dzfcr8NkWX4uN4LewMMJXJPLcN8v9UloOB1EoRSbjVt XIDyXCLoGUTQfsHuHk7vQAqoUwvNmw0m9nRSO+69kKg4aR0cj9s1yZq5KS0vp1vT CcYfLmlPG8i+fnYkGqWSvXbm4vny381CZpeDvCtEnhmtDvxn3mvDC3TKc4DQzIdK 6+EZbkx1pkcLJ8zfzT/hA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTELEN73CHW8kegp0O6/lis+T1I//5HVZRLk0L3z0xEvL3YWjys9jJI42ZkE47W04p U+ION6P1nJyI3fN349/shlRXeZSxA8Uhb/fFSUMwTU/tFo+h3A9qSA71sjtT4iAfTzVWex mHNSQ5XksjoYdtUTH8QLMSc63D5N0q004fyjAE14alsJwyholqqt5onOo5Peq6CVptQ8O9 oO1s0URUeR9mTz1GaN5snI/dqO7PcIYbiN6iX3KqC+IZC765kq6JiqoYKVSe+xta8pxNtm KFt+nQ6Oi4uJtvcYWK2YuQ+pwNDQ/OoLHzJ9l3X1OB7XRlWDF+WLbY9nE7LkQdnVIepzFe XO8UbM65eITRbO2H0Op4NrgMDK4vR4xv2BPzF9ltDSlWc2mgWSBEUYUC1scSSvGcMQvu69 kXKWGPMvlxdN3osAHJVj5vfozuavYayO1phbzYNZmsnJtshrb/J4enNlaQ1DwU34ppUBhR LIHiujYJ/mWrJaA43UZb32EOTjeou/wkTv3SxDik0c2Ig9nHTFFbV0HL8fVwTYcGDcXJkg qDn1nH37gwvWCi5wEq9pZpZdJiFP4rJ8pTQtEtyqcKTy8g8QfV7v4f8/cjk1jXD+oQiWox krtupG62WfQepnzlouIfnp5fnQfq87ObVdQrKkROZP0MBGhRq9kV32sWctHg X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 9 Jul 2026 04:32:09 -0400 (EDT) Message-ID: <82f35e5c-9983-4c97-8567-451bc2cb8761@eisentraut.org> Date: Thu, 9 Jul 2026 10:32:08 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] Fix null pointer dereference in PG19 To: Paul A Jungwirth , Tom Lane Cc: Aleksander Alekseev , PostgreSQL Development References: <626986.1776785090@sss.pgh.pa.us> <84f20d0d-3bc8-4843-bd7e-21bce20f8582@eisentraut.org> <4984118e-0dc5-49a9-b279-fd0b707be8e0@eisentraut.org> <391a2845-105b-4048-a113-835c2742fea1@eisentraut.org> <1894792.1783476457@sss.pgh.pa.us> Content-Language: en-US From: Peter Eisentraut 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 08.07.26 18:48, Paul A Jungwirth wrote: > On Tue, Jul 7, 2026 at 7:07 PM Tom Lane wrote: >> >> Paul A Jungwirth writes: >>> On Tue, Apr 21, 2026 at 8:24 AM Tom Lane wrote: >>>> Checking this at parse time is completely the wrong thing. >>>> The view could have gained (or lost) triggers by the time >>>> it's executed. >> >>> But INSTEAD OF triggers are selected in the rewriter, which uses the >>> same relcache snapshot as parse analysis. And a concurrent change >>> can't sneak in different triggers, because that causes a relcache >>> invalidation, so we redo the parse & rewrite phases. >> >> You have forgotten about views and rewrite rules. Those go to disk in >> post-parser form, and will be rewritten only at execution sometime >> later, *without* a re-parse. > > Ah yes, thank you! I should have been able to work that out. > > Here is another patch series. No code changes, but I inserted a new > patch with tests showing that parse-time checking crashes, but > rewrite-time and exec-time checking catches the forbidden statement. > So the series is: > > v1: parse-time check, tests pass > v2: add tests that crash the server > v3: rewrite-time check: tests pass > v4: exec-time check: tests pass What do you want to do with these? Here you list them as four different versions, but the attachments are four incremental patches of the same version. Do you propose to apply all of them? It seems we definitely do want the exec-time check. And I can see maybe the parse-time check as an additional user-friendliness feature. But maybe we don't need to check three times?