Re: BUG #19074: pg_dump from v18 loses the NOT NULL flag in the inherited table field when dumping v17-databases

From: Andrew Bille <andrewbille(at)gmail(dot)com>
To: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
Cc: Álvaro Herrera <alvherre(at)kurilemu(dot)de>, David Rowley <dgrowleyml(at)gmail(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19074: pg_dump from v18 loses the NOT NULL flag in the inherited table field when dumping v17-databases
Date: 2025-10-17 07:05:51
Message-ID: CAJnzarzpALeGtF-1VPoLa5=52BoixpVPE9BzrxbnPbtAw741jg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Looks good for me. I checked it on my enhanced upgrade test.

Thanks.

Regards,
Andrew

On Mon, Oct 6, 2025 at 7:04 PM Dilip Kumar <dilipbalaut(at)gmail(dot)com> wrote:

> I think we can fix it in getTableAttrs(), see attached, with that I
> can see my dump is correct. This is just a quick way to show what I
> am thinking, maybe we can improve this condition. I believe
> flagInhAttrs() is more about resetting the "notnull_islocal" if any of
> the parent already has it as non null. This fix is working with this
> basic case, but I haven't investigated whether it will work in all
> cases or is it breaking anything.
>
> --
> Regards,
> Dilip Kumar
> Google
>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bo Peng 2025-10-17 07:55:26 Re: Automating Failover Resync & Re-Attach in pgpool2
Previous Message David Rowley 2025-10-17 01:21:00 Re: Segfault in RI UPDATE CASCADE on partitioned tables with LIKE+ATTACH child (attnum drift)