Re: BUG #15482: Foreign keys to a partition (NOT A PARTITIONED) break the server

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: alberici(at)abinetworks(dot)biz, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15482: Foreign keys to a partition (NOT A PARTITIONED) break the server
Date: 2018-11-02 15:36:49
Message-ID: 20181102153649.zibk2urkmlyxokqr@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Andres Freund 2018-11-02 15:40:50 Re: Wrong aggregate result when sorting by a NULL value
Previous Message Tom Lane 2018-11-02 15:34:46 Re: Wrong aggregate result when sorting by a NULL value