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 1wfBnr-005K2T-2u for pgsql-hackers@arkaria.postgresql.org; Thu, 02 Jul 2026 07:25:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wfBnp-000mSd-1r for pgsql-hackers@arkaria.postgresql.org; Thu, 02 Jul 2026 07:25:41 +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.96) (envelope-from ) id 1wfBnp-000mSU-0g for pgsql-hackers@lists.postgresql.org; Thu, 02 Jul 2026 07:25:41 +0000 Received: from fout-a8-smtp.messagingengine.com ([103.168.172.151]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wfBnm-00000001LBT-2YUI for pgsql-hackers@postgresql.org; Thu, 02 Jul 2026 07:25:40 +0000 Received: from phl-compute-12.internal (phl-compute-12.internal [10.202.2.52]) by mailfout.phl.internal (Postfix) with ESMTP id 9AFB6EC010D; Thu, 2 Jul 2026 03:25:35 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-12.internal (MEProxy); Thu, 02 Jul 2026 03:25:35 -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=1782977135; x=1783063535; bh=m4CHNKWoUmogdZyCT1uBv3USXEROVwLv WchM1j69iLY=; b=N3FTa9pJi0Wu+pAT/e/88AxyFZ4g/UM8T44XbtBrP8SfattP TrSz6lSE3iMqudKL1kwQ3veSyA8LqGCveDYVEneZDDa16po2SkcV0fifLeCaw8+k O7ZKDMMNNj17XR4Nb21C6spk88KDK+w3lI1LDbf9fD48XwBwQAcKR2C0xel/twB6 XWDNSnYmt3yuNKCWREiNuPtV64G3tleVwYLoGGlIljstopDtUdpIpshdma9d6oTp eMcLjQyTYKwOb4pCDgN5i89jStk4qbbYlp+AACOi0DDhFCBwFJL1nyoljzxeFIiN 7xtkBS9XKh/kKWbNS06ueY9ZvExBYLZYBZuRPg== 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=1782977135; x= 1783063535; bh=m4CHNKWoUmogdZyCT1uBv3USXEROVwLvWchM1j69iLY=; b=e APeq3Ao2ai2fsel2aqWvbEQcy6G3IGLnHCpuD1exFWFJ9UywoBxRWnLE6IN7leK7 Sc10WDWCwqDnrXCnf1tByEeuHlkn3AL3LxxX3NoKYUrrnpJuhBK8frijFkUWRrK0 qOjnM0eVRwmyl8tChiEJlZJSfJxU/91GmDBRid5Ag38338pluOXlmhcc23SUuusC zxoSy+0dQSuReMcYoO8TFpH8wI/kQEyaXUQlxLDJtYLjPIcLDjw9fkFHfH2nqHbc AqpiiBvWFyUkmh9APJdt1wiYOtisJG+8Vao6W2Znn3C+zQP1tkG1WyUWu8FnDmoG VNyCADzpo47BDEYdkAV2g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTEYiW1oc1mqulkF/4bXbUIBACEvviwfZc1w2g44oRXxOe+8rAKPvm0GlfrHlNSV51 R2VyEzHF34vWhhdk+AsB7H+kQVLvP3ZrIbkQ9ORevGRIHa/m5JyYCizPmbqdbK00RjH8cx sEYKDd4zcwZxymp49DarSondSvQcGOfk/MPNfa+askOHO6F9G85DlqoHOynPz5pURQ7Ufu rZk5/uFzSfaX0MpwkbVfD6UDEdZIOEMyKfi8VD4W/IkgIrkZX44U0rv08ykFBJRzDvUyhO coNIgkmN+rj7N7ZgIi17OA5XAWJOxxh8gRe5lNvrtwJqHBFvazqSEoU08XqZ55/Uk3Qscj PM7zuCUpCgP5AS6X1a9z1pLfH9ChdgCe2NE2taadZ0v0f+JFrgaEfKdIRzoLax1Ru0IDJZ z8T/48wWHwFiZcrQzY8rTXS+M84Lw+Xlc/bwiyDmKUxtmSi/A0eUQXNgDDW/rf1x3fzBUk ksH1mjWXLygKDvMWKzG6RD3OJQUpS6m16SOLgtY1WAltxbEloQyglIwv5mby+emdT8QviY obaZCCHLcnwv0VmDN0ymLvktA8yQKxIS9HhMoLZsXwnfuD4DrEiTQn06Q93+OA+a29wSeW uHIBEWHoWUAznAw5TzOwZhwePiqWrYHeqogmijjwsg8o/K7c7T8i+BCFidmQ X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 2 Jul 2026 03:25:34 -0400 (EDT) Message-ID: <4984118e-0dc5-49a9-b279-fd0b707be8e0@eisentraut.org> Date: Thu, 2 Jul 2026 09:25:33 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] Fix null pointer dereference in PG19 To: Paul A Jungwirth , Aleksander Alekseev Cc: PostgreSQL Development References: <626986.1776785090@sss.pgh.pa.us> <84f20d0d-3bc8-4843-bd7e-21bce20f8582@eisentraut.org> From: Peter Eisentraut Content-Language: en-US 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 29.06.26 09:38, Paul A Jungwirth wrote: >> IMO it's a little bit late in the PG19 cycle for making this work. >> This is an implementation of a new feature which is not present at the >> moment which to my knowledge we don't do after the feature freeze. Our >> goal is to fix the crash and leave the rest for the PG20 cycle. >> Clearly the feature needs more discussion and thorough testing. > I don't really think this is a new feature. It is a fix to make FOR > PORTION OF not execute when it shouldn't. The change here is quite > simple. > > But I don't mind holding it back if that's what people want to do. > Looking more closely at INSTEAD OF triggers, I found another bug: the > FOR PORTION OF qual (and TLE) were not added, so the trigger would > fire on more rows than it should, and NEW.valid_at was not > pre-computed. The second patch here fixes that. I'll defer to others > whether we should fix the INSTEAD OF interaction now or wait 'til v20. It seems to me that both FOR PORTION OF and INSTEAD OF triggers are SQL standard features, so this discussion should refer to what the standard says, and possibly consider what other implementations do (in addition to discussing what makes sense). Since that hasn't been done yet, maybe prohibiting this combination for now, as proposed by Aleksander, would be best.