On Tue, Jan 21, 2025 at 7:25 PM Álvaro Herrera wrote:
>
> On 2025-Jan-20, Sami Imseih wrote:
>
> > Patch looks good to me,
>
> Thanks, pushed.
>
A big thanks to Álvaro and Sami for getting it fixed!
Regards,
Amul
On 2025-Jan-20, Sami Imseih wrote:
> Patch looks good to me,
Thanks, pushed.
--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
On 2025-Jan-20, Sami Imseih wrote:
> 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?
> > 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
On 2025-Jan-20, Sami Imseih wrote:
> 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.
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?
In my suggestion [1], I just do one extra pg_constraint lookup
to d
On 2025-Jan-20, Sami Imseih wrote:
> Below is the repro I used. Similar as you original repro,
> but without subpartition on foo_p0. This also results in the segfault
> with your attached patch.
I think the issue in Amul's patch is just that the list was not
initialized to NIL.
Other than the la
> should cut the link between the parent constraint and the constraint on
> the partition being detached.
correct by setting the conparentid to 0 in pg_constraint and to delete
the pg_depend record for partition dependency. But in the repro case,
we don't have a dependency as the table the foreign
On Sat, Jan 18, 2025 at 2:14 AM Sami Imseih wrote:
>
> This is a bug indeed. I tried your patch, but it ends up in a seg fault.
>
> [...]
> If the relation on the parent and child constraint match, that
> tells us we don't have inheritance.
> So, I am thinking we should add another condition for c
This is a bug indeed. I tried your patch, but it ends up in a seg fault.
I also see this was raised in another thread [0].
It can be reproduced in a slightly simplified case, using only a
single level partition.
"""
CREATE TABLE bar(id int PRIMARY KEY) PARTITION BY RANGE(id);
CREATE TABLE bar_p0
Hi,
While detaching a partition with a foreign key referencing a partitioned table,
I am getting the following error:
ERROR: could not find ON INSERT check triggers of foreign key constraint 16636
I haven’t looked closely at what the issue might be, but it seems the logic
inside DetachPartition
11 matches
Mail list logo