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: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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-10-16 07:32:16
Message-ID: atHRWgHMfmfYeiYn@alvherre.pgsql
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2026-Oct-15, Manu wrote:

> The existing regression tests already run all four call sites
> (foreign_key, truncate, temp, alter_table), so I don't think it needs
> new tests; it needs a reviewer. Álvaro, since this got slow when
> not-null constraints moved into pg_constraint, would you have time to
> look at it?

Sure. But this is pg20 development work, and I'm still on the hook for
the yet-to-be-released pg19 and I also want to get older bugs repaired.
So I'm afraid this will have to wait.

--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
"No hay ausente sin culpa ni presente sin disculpa" (Prov. francés)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Jones 2026-10-16 07:34:51 Re: Reject COPY TO of unlogged relations during recovery
Previous Message Nisha Moond 2026-10-16 06:57:26 Re: Fix WITHOUT OVERLAPS multirange with location replication