Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1jBnED-00030e-Ro for pgsql-bugs@arkaria.postgresql.org; Tue, 10 Mar 2020 22:19:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jBnEC-0002JW-FV for pgsql-bugs@arkaria.postgresql.org; Tue, 10 Mar 2020 22:19:56 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1jBnEC-0002JP-75 for pgsql-bugs@lists.postgresql.org; Tue, 10 Mar 2020 22:19:56 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jBnEA-0003ww-0A for pgsql-bugs@lists.postgresql.org; Tue, 10 Mar 2020 22:19:55 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 02AMJph6028204; Tue, 10 Mar 2020 18:19:51 -0400 From: Tom Lane To: dwilches@gmail.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16293: postgres segfaults and returns SQLSTATE 08006 In-reply-to: <16293-26f5777d10143a66@postgresql.org> References: <16293-26f5777d10143a66@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Tue, 10 Mar 2020 21:13:24 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <28202.1583878791.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 10 Mar 2020 18:19:51 -0400 Message-ID: <28203.1583878791@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk PG Bug reporting form 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 partitio= n > had a constraint that disallowed that row, so the row couldn't be insert= ed > and Postgres ended with a segfault. Hm, works for me: regression=3D# create table tt (f1 int, f2 text) partition by list(f1); CREATE TABLE regression=3D# create table t1 partition of tt for values in (1); CREATE TABLE regression=3D# create table tother partition of tt default; CREATE TABLE regression=3D# alter table tother add check (length(f2) > 1); ALTER TABLE regression=3D# insert into tt values (1, 'f'); INSERT 0 1 regression=3D# 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=3D# = 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