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.98.2) (envelope-from ) id 1xGevD-00000002XjH-0vcu for pgsql-hackers@arkaria.postgresql.org; Tue, 13 Oct 2026 16:00:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xGevB-0000000F7Qi-20jr for pgsql-hackers@arkaria.postgresql.org; Tue, 13 Oct 2026 16:00:09 +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.98.2) (envelope-from ) id 1xGevB-0000000F7Qa-0QTA for pgsql-hackers@lists.postgresql.org; Tue, 13 Oct 2026 16:00:09 +0000 Received: from fhigh-b3-smtp.messagingengine.com ([202.12.124.154]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xGev8-00000001pRy-23F1 for pgsql-hackers@lists.postgresql.org; Tue, 13 Oct 2026 16:00:08 +0000 Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfhigh.stl.internal (Postfix) with ESMTP id 0E14F7A010D for ; Tue, 13 Oct 2026 12:00:06 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Tue, 13 Oct 2026 12:00:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kurilemu.de; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to; s=fm3; t=1791907205; x= 1791993605; bh=NuQ0+GVJj1+p0B8DQiK9/At6OjW/PiAXRXEFopxJiw0=; b=Z FU58FxujQPHnqQ9M2iTBGaHGvS0KbHDDMaW7OowSlCPan0n7CKZh/Qlo1gfkjlTK dfdKUIoxqjneDnToS1VuT7wCQNx+lLWJFZf3285ToK0wf1dWt4ALPhFkAq4CnZrg iPcFFR+A0OE+dwZYWF98O5OGug7n3X7OAWyDhZQpZGUAxoxZ5XC/RiJtCqLetM3X fNd1RgG2Mx9s/kFn9utPFpg7ccm3ou18/6hJtZElpzhVNNTtJlyNKomhBY9cLsXX 9p1il0Gg9qNxiyWpKKdK6DpS3FfgHybFEa2fujRkGaI3j/qj6/DAFjMH521xr5+N WZeDmvhZMcXnj8WVCavPw== 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 :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1791907205; x=1791993605; bh=N uQ0+GVJj1+p0B8DQiK9/At6OjW/PiAXRXEFopxJiw0=; b=pY8RpTrvt5heyco63 GwHvCPNFhA6FB20ps+nqlXpOWuyN34hz+t9uCIC2mGynOhYu6CVLjCJ2WDDlolaO yb5Nxrc0ZLkCRN+oi1ZiuX2fh6DmDOZ2dmZdsJiIyiebHZDxNcCl65E1SqDQG7PC L1cyKxpOrjA9Yp4Xy7GN+sOQhd7x+9Lh7kNlkMaIzpzFdyqjhZzUec5vaC6hcht6 uEBAcHIojO1bPzdrn/3huNFsqcXZu25CdXserf9atUsRnnttvFk21bx9y1Zb2Tbo rmQidaTnfQLW5Z/KvPXaEidbJ4xkq67l7hCbz3WSPL7Y/00+1IVzFh5YcK5mdO5K /3KXQ== X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-06; repo=github.com/dkim2wg/interop; date=2026-10-04; sw=lmtpprox; action=sign d=kurilemu.de a=rsa-sha256; DKIM2-Signature: i=1; m=1; t=1791907205; d=kurilemu.de; mf=PGFsdmhlcnJlQGt1cmlsZW11LmRlPg==; rt=PHBnc3FsLWhhY2tlcnNAbGlzdHMucG9zdGdyZXNxbC5vcmc+; s=fm3:rsa-sha256:s64H8X8F6VJY9oeihGBEIprLaF9YBgDaLY2X0b3pPVFcDAP Lyl0cDoMZOHNI4qsoBvuLPMpiOhYX+Qwhh7q+zwzj2AnUMPyp7pwlRO3ch2WEaRe uvDdjSSxK90hkTgqogsGHmZ+E0z3U/OW9BvZcsnnVcngHqn4BSv9C/AmnkFYLcf4 yDOykzeuL2QGnPaL5WGWtkK9zVeLuh1sKoeFOY0NFrDakque6PgqDlc2UlOEFL0O zgFLthtixr/w93yjQBseXkMkmp1DFXV9rslHJQt9mqsZr2QMzOPytXofTGtxFXMH vQlWzqMilXSO6yQmHdzn86BNUvBLNRZJ+IIgCSg==; X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-06; repo=github.com/dkim2wg/interop; date=2026-10-04; sw=lmtpprox; action=mi-m=1; hc=12; hn=cc,content-disposition,content-transfer-encoding, content-type,date,feedback-id,from,in-reply-to,message-id, mime-version,subject,to; Message-Instance: m=1; h=sha256:avwNi9DQI6ab6fTnBG8GAkezasgrz1tC7Q2tVqAoONc=:067erNmTrtH6cbutn4bYIDu7X/u5ijc2Ioh6+VZxb2U=; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTF9zfLuu1om7T09X8DRjs0/m1FQhUhTqZ0kRDe55bJGWX/daNkLOp20vsFVeIRVJL Q8ysIDM0/YsJWOpZ5R3CwwOIJd+jV79EkZ/BZlt/mbBAbdAyjd/FnKrEGGwq5wEuxt7m8p tnlRPrpuE/PP/FiekwWUt4fRQNRGRDy5pU1oTEzbrAMmk4wsITGGqn6SE0h4hEyBJCw8TI dfXI5Vj89w8BjOZuVXVp5bS1y6oRnnyNm2IPwhoWFDlPzo5YfQlZVpR1Lt9LY8Hq/TWtsv VrC9q5493RNWIw9eE+SfWVUhGBq0lKt05AlSgdkAo0DinwYPaMaNRIFGhDDtW9kW+6AVuB WJyNxld5wqXtPTmYqBmNjgzKXTclydcx9sIXB3XYl2Os0Fn2rcK2quKvf1RW/5oo3XMS/E YzjaqARxw+WT7/lbJwOp4U8kVrVquHADJqqU3JX6hPi9g709kzOn4+6DPxicvD7wI8u6rI VFouAWHTNCNt/LqaXG5oCJcmtm/JLz4Rfr9+fvZb7jFm4VlR2DCH0xbZHEQQM+UkTDYCvw okszdkJ/YTDEenoT3al7JE/+hM3Lg87XX1dSYa8vVOvOptyFwk300zhxWYDJkSGG1fitgA 3UM9X15R9jcCBi+5R0xdRT5myvYcWDj02oGQRq61zOfFMtgHD93L1kVGQTbw X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 13 Oct 2026 12:00:04 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1791907202; bh=067erNmTrtH6cbutn4bYIDu7X/u5ijc2Ioh6+VZxb2U=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=qVXx9jh4AgxXVNffWNP5eT8mbs66ZDjbSggbDE9sysIkr55fVdJCxztTy0RWuvhkp 5E5oprWCZBsyIb2wrL/qvIuNexUu71tmPXCZ8Ok7Mm7zgRy2/ZCx1aBQMiEpKmGnjW j/dZamPtsqNTq87JJF1R0J3Vhe31hwjhGAz9xR+gLjuiOnyZYxOdSnGkzj58KiJ4Os ozLENdzuLEfwRAHv6YxpfL4eA/3s5CC/w3ap1NOUpNnOr6Jw+K7udsrdJeqvgd9jDa 2++MUzKrb8ZT0nqiBuNEdc4I99qXZmKqxRYHhtjQsG6NiFK/WlHoc3MgoBdMnKMaKX BsZjewHl0S+RA== Received: by ida.kurilemu.internal (Postfix, from userid 1000) id 1E2B7B00198; Tue, 13 Oct 2026 18:00:02 +0200 (CEST) Date: Tue, 13 Oct 2026 18:00:02 +0200 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: shihao zhong Cc: Richard Guo , Richard Guo , pgsql-hackers@lists.postgresql.org Subject: Re: pgsql: Don't trust NOT NULL on virtual generated columns of partitioned Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2026-Oct-13, shihao zhong wrote: > Álvaro Herrera writes: > > we read a NULL value from a column that's marked as not-null, which > > shouldn't happen. > > One data point, this part is not new in 19. Your example reads the > same NULL through the parent on 18.6. Right -- I was running the reproducer in 18 as well. > My initial idea is to just fix the PG19 regression instead of > addressing the entire problem. Yes, Richard committed this fix already -- I was replying to his commit message of your fix. https://postgr.es/m/flat/E1xFKs5-0000000116b-2Cge%40gemulon.postgresql.org > > But I can see it breaks a lot of things, and what this commit does > > is just to work-around one of the things that design breaks. > > Agree, I think there is a design question here and a more completed > fix should target 20. This is where I disagree ... IMO this is serious problem whose fix should be back-patched. I suspect we don't really know what other things this misfeature can break. -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ "Hay quien adquiere la mala costumbre de ser infeliz" (M. A. Evans)