Re: BUG #15482: Foreign keys to a partition (NOT A PARTITIONED)break the server - Mailing list pgsql-bugs

From Alvaro Herrera
Subject Re: BUG #15482: Foreign keys to a partition (NOT A PARTITIONED)break the server
Date
Msg-id 20181102153649.zibk2urkmlyxokqr@alvherre.pgsql
Whole thread Raw
In response to Re: BUG #15482: Foreign keys to a partition (NOT A PARTITIONED)break the server  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-bugs
On 2018-Nov-02, Alvaro Herrera wrote:

> On 2018-Nov-01, PG Bug reporting form wrote:
> 
> > is it normal that server break (segmentation fault, recovery mode and
> > restart !) if i 
> 
> Of course not.  Looking into it now.

I cannot reproduce it,

create table part (a int primary key, b int) partition by range (a);
create table part1 partition of part for values from (0) to (1000);
alter table part1 add foreign key (b) references part1 on update cascade on delete restrict;
insert into part1 values (1, null);
insert into part1 values (10, 1);
delete from part1 where a = 1;

This works fine (i.e. throws error that referencing row exists).

There must be some other element to your schema that I'm missing.  What
is it?  Also, if you got a core file, can you obtain a backtrace from
it?

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Wrong aggregate result when sorting by a NULL value
Next
From: Andres Freund
Date:
Subject: Re: Wrong aggregate result when sorting by a NULL value