Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gIbVK-0000LW-Jn for pgsql-bugs@arkaria.postgresql.org; Fri, 02 Nov 2018 15:36: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 1gIbVJ-0000Tm-0y for pgsql-bugs@arkaria.postgresql.org; Fri, 02 Nov 2018 15:36:57 +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_SHA384:256) (Exim 4.89) (envelope-from ) id 1gIbVI-0000Tf-Qe for pgsql-bugs@lists.postgresql.org; Fri, 02 Nov 2018 15:36:56 +0000 Received: from mail-qk1-x744.google.com ([2607:f8b0:4864:20::744]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gIbVG-0003Wg-71 for pgsql-bugs@lists.postgresql.org; Fri, 02 Nov 2018 15:36:56 +0000 Received: by mail-qk1-x744.google.com with SMTP id 131so3696598qkd.4 for ; Fri, 02 Nov 2018 08:36:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=Z1esxpIy/xDhXPQoEbBW7NmZL46MJZ4sPpa/mtSPrmM=; b=yhUjZUiIloavfWVtQWcuwa/xdDgkR5OPcO0Wkgj6Bi4Rrfda8VRzrj9hMtC+7/N/zg py9OLvQmYxWohLLerubnSSADbMSn7IGNGyPtRG6OD3DVSeuUwa4TPVjbQnMIyMW+G6+M Dntys14AazQxqJ2KgAssGns4Vni2UrHuSd78o1yxa/mXMtraz70R0vgILV3sRENlPhGg gluG00qWg+06J5Cg6qUb1+GBFjC0vHW+ywyg2cm1++aJ9CDsPUT5fMjG8Uvzu5gs7Fmf jmWVk8WbyCRCG1vYOAIA8m0gul+ouzqTCdjCf8ZiiLzRnc0LkVScDL7fJXoIETCVp4Sc GYTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=Z1esxpIy/xDhXPQoEbBW7NmZL46MJZ4sPpa/mtSPrmM=; b=C3CP+WEG73nv5fD7EceG1fPnQkNwu/H3ysdEt/jMhlWhphWlV81oa02wkYtl1VcPD3 JVlis/jxb5kP1waZKFv+EE750z9vTTzC7NxvvvgjZKUXDulIzA1KwAKsYacWwT4x+X8d NQT002MLwRBUX7QhWwZ9I9POAA1v8Q2TsaWMofXOTRi+C4oE/Qe99jpSNrwj3ESKYzfG cj0Yo5mlgPqfBvIYFqoSRFaLiwGL6Mb7cYw39UNwO73T/olpu1CfTAlG/6tPQ1VdXhui w1NEfTay2GIziUV4YNEv84A58cN8hujr1JMhwBw4v2w/y4kNyvpTmFCA1oAYcB7RqjDk FVUw== X-Gm-Message-State: AGRZ1gIN3IfYjkN+mLe9fF03J/wwSyWNMoBowpfBhUKX4HqzE9HCaAG7 8A6PehwZpQHzteqohJD7vtNASBp+kNU= X-Google-Smtp-Source: AJdET5ewckV6sRnEYbs3Man99W2biOrhLkjnIcDG+R00czSRMeiJvSJgWu5hJzl53essTrPsnAH6iA== X-Received: by 2002:ac8:4258:: with SMTP id r24mr11477952qtm.213.1541173012432; Fri, 02 Nov 2018 08:36:52 -0700 (PDT) Received: from alvin.alvh.no-ip.org ([201.186.80.75]) by smtp.gmail.com with ESMTPSA id f44-v6sm24613892qta.53.2018.11.02.08.36.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 Nov 2018 08:36:51 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id DBF585ED; Fri, 2 Nov 2018 12:36:49 -0300 (-03) Date: Fri, 2 Nov 2018 12:36:49 -0300 From: Alvaro Herrera To: alberici@abinetworks.biz, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15482: Foreign keys to a partition (NOT A PARTITIONED) break the server Message-ID: <20181102153649.zibk2urkmlyxokqr@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20181102151027.6lpr2ghnw3yp3qex@alvherre.pgsql> User-Agent: NeoMutt/20180716 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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