Re: Assert failure when validating foreign keys

From: Andres Freund <andres(at)anarazel(dot)de>
To: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Assert failure when validating foreign keys
Date: 2019-03-25 14:24:05
Message-ID: 20190325142405.unsurgfduguoepp4@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2019-03-24 23:54:53 +1300, David Rowley wrote:
> This results in an Assert failure on master and an elog ERROR prior to
> c2fe139c201:
>
> create role test_role with login;
> create table ref(a int primary key);
> grant references on ref to test_role;
> set role test_role;
> create table t1(a int, b int);
> insert into t1 values(1,1);
> alter table t1 add constraint t1_b_key foreign key (b) references ref(a);
> server closed the connection unexpectedly
> This probably means the server terminated abnormally
> before or while processing the request.
> The connection to the server was lost. Attempting reset: Failed.
>
> Fails in heapam_tuple_satisfies_snapshot() at
> Assert(BufferIsValid(bslot->buffer));
>
> c2fe139c201~1:
> ERROR: expected buffer tuple
>
> The test case is just a variation of the case in [1], but a different
> bug, so reporting it on a different thread.
>
> I've not looked into the cause or when it started happening.

That's probably my fault somehow, I'll look into it. Got some urgent
errands to run first (and it's still early here).

Thanks for noticing,

Andres Freund

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ryan Lambert 2019-03-25 14:40:50 Re: Fix XML handling with DOCTYPE
Previous Message Heikki Linnakangas 2019-03-25 14:23:49 Re: Usage of epoch in txid_current