Re: pgsql: Don't trust NOT NULL on virtual generated columns of partitioned

From: shihao zhong <zhong950419(at)gmail(dot)com>
To: Richard Guo <guofenglinux(at)gmail(dot)com>
Cc: Álvaro Herrera <alvherre(at)kurilemu(dot)de>, Richard Guo <rguo(at)postgresql(dot)org>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Don't trust NOT NULL on virtual generated columns of partitioned
Date: 2026-10-13 15:41:39
Message-ID: CAGRkXqR=xUQE=dCZvLXC8PffDpvioqikCiQF6qm7kjo85p486w@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Hi Alvaro and Richard,

Álvaro Herrera <alvherre(at)kurilemu(dot)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. My initial idea is to just fix
the PG19 regression instead of addressing the entire problem.

> 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.

Thanks,
Shihao

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Álvaro Herrera 2026-10-13 15:45:13 Re: pgsql: Don't trust NOT NULL on virtual generated columns of partitioned
Previous Message Richard Guo 2026-10-13 14:34:50 Re: pgsql: Don't trust NOT NULL on virtual generated columns of partitioned

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2026-10-13 15:44:58 Re: Incremental backups report progress as if they were full backups
Previous Message Harrison Booth 2026-10-13 15:31:33 Re: [PATCH v2] Fix races in Windows pthread emulation