Re: ATTACH PARTITION cost grows linearly with pg_constraint size (seqscan in CloneFkReferenced), much worse since not-null constraints are in pg_constraint (PG 18)

From: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
To: Manu <manuelreyesbravo(at)gmail(dot)com>
Cc: Bernhard Wonisch <bernhard(dot)wonisch(at)gmx(dot)at>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: ATTACH PARTITION cost grows linearly with pg_constraint size (seqscan in CloneFkReferenced), much worse since not-null constraints are in pg_constraint (PG 18)
Date: 2026-11-12 14:35:25
Message-ID: avXNYU1CpgCLF6j-@alvherre.pgsql
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

On 2026-Oct-02, Manu wrote:

> v3 attached, rebased on current master for CF 7365. The only change
> from v2 is that it no longer bumps catversion, which was the conflict;
> that's left to the committer. make check passes.

For closure: per [1], this has been committed. I'm afraid we don't have
a solution for users of Postgres 18 and 19.

[1] https://postgr.es/m/avXKHF359xUI1AVE@alvherre.pgsql

Lastly, Manu: when you omit a necessary catversion bump (which IMO is
good to prevent pointless conflicts), I suggest to include an XXX note
in the commit message. Otherwise somebody might forget to do it. I
know it could happen to me, at least.

--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2026-11-12 15:17:33 Re: SIGFPE handling
Previous Message Álvaro Herrera 2026-11-12 14:29:13 Re: Do we need an index on pg_constraint.confrelid?