From: Álvaro Herrera <alvherre@kurilemu.de>
To: shihao zhong <zhong950419@gmail.com>
Cc: Richard Guo <guofenglinux@gmail.com>
Cc: Richard Guo <rguo@postgresql.org>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: pgsql: Don't trust NOT NULL on virtual generated columns of partitioned
Date: Tue, 13 Oct 2026 18:00:02 +0200
Message-ID: <as5UaM2WWiFDiUAE@alvherre.pgsql> (raw)
In-Reply-To: <CAGRkXqR=xUQE=dCZvLXC8PffDpvioqikCiQF6qm7kjo85p486w@mail.gmail.com>
Hi,
On 2026-Oct-13, shihao zhong wrote:
> Álvaro Herrera <alvherre@kurilemu.de> 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)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: alvherre@kurilemu.de, zhong950419@gmail.com, guofenglinux@gmail.com, rguo@postgresql.org, pgsql-hackers@lists.postgresql.org
Subject: Re: pgsql: Don't trust NOT NULL on virtual generated columns of partitioned
In-Reply-To: <as5UaM2WWiFDiUAE@alvherre.pgsql>
References: <CAGRkXqR=xUQE=dCZvLXC8PffDpvioqikCiQF6qm7kjo85p486w@mail.gmail.com> <as5UaM2WWiFDiUAE@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox