pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: dwilches@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16293: postgres segfaults and returns SQLSTATE 08006
Date: Tue, 10 Mar 2020 18:19:51 -0400
Message-ID: <28203.1583878791@sss.pgh.pa.us> (raw)
In-Reply-To: <16293-26f5777d10143a66@postgresql.org>
References: <16293-26f5777d10143a66@postgresql.org>

PG Bug reporting form <noreply@postgresql.org> writes:
> I finally found the issue was that one of the tests was trying to insert a
> row on a partitioned table, but there was no partition where to put that
> row, so it had to go to the default partition. But, the default partition
> had a constraint that disallowed that row, so the row couldn't be inserted
> and Postgres ended with a segfault.

Hm, works for me:

regression=# create table tt (f1 int, f2 text) partition by list(f1);
CREATE TABLE
regression=# create table t1 partition of tt for values in (1);
CREATE TABLE
regression=# create table tother partition of tt default;
CREATE TABLE
regression=# alter table tother add check (length(f2) > 1);
ALTER TABLE
regression=# insert into tt values (1, 'f');
INSERT 0 1
regression=# insert into tt values (3, 'f');
ERROR:  new row for relation "tother" violates check constraint "tother_f2_check"
DETAIL:  Failing row contains (3, f).
regression=# 

Admittedly this is v11 branch tip not exactly 11.7, but I don't see
anything related-looking in the commit log.  So I think there is some
contributing factor you didn't mention.  Could you provide a
self-contained reproduction script?

			regards, tom lane





view thread (13+ messages)  latest in thread

Message-ID: <28203.1583878791@sss.pgh.pa.us>
Permalink:  ../28203.1583878791@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/28203.1583878791@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, dwilches@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #16293: postgres segfaults and returns SQLSTATE 08006
  In-Reply-To: <28203.1583878791@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox