Re: Bug in detaching a partition with a foreign key.

From: Sami Imseih <samimseih(at)gmail(dot)com>
To: Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Amul Sul <sulamul(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bug in detaching a partition with a foreign key.
Date: 2025-01-20 18:26:13
Message-ID: CAA5RZ0vjfA5NZ3ncNHO9Py2a6QRYLWE2WWV_nBxExEG8=y-n5A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> > The patch that Amul and I wrote both achieve the same result.
> > The approach that Amul took builds a list of constraint OIDs,
> > which could grow with the number of partitions and foreign keys
> > on those partitions. Maybe not a big deal?

> Nope, not a big deal. It would be a big deal if we were talking about
> 268 million partitions (>1GB palloc size), but that's impractical for
> other reasons.

that's fair.

Patch looks good to me, but I am not sure about this part of the comment:

"Only the topmost one is to be considered here; the child constraints
must be left alone,"

In this case, none of the pg_constraint entries are actually considered. right?

Regards,

Sami

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2025-01-20 18:39:15 Re: Eager aggregation, take 3
Previous Message Tom Lane 2025-01-20 17:57:20 Re: Eager aggregation, take 3