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.89) (envelope-from ) id 1izcDR-00067U-VB for pgsql-bugs@arkaria.postgresql.org; Thu, 06 Feb 2020 08:08:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1izcDP-0008OL-KW for pgsql-bugs@arkaria.postgresql.org; Thu, 06 Feb 2020 08:08:47 +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 1izcDO-0008MS-6H for pgsql-bugs@lists.postgresql.org; Thu, 06 Feb 2020 08:08:47 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1izcDK-00033u-7t for pgsql-bugs@lists.postgresql.org; Thu, 06 Feb 2020 08:08:45 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id E66F14CF; Thu, 6 Feb 2020 03:08:37 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 06 Feb 2020 03:08:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=G3Oj4nq+TrpPACH7zBkVCDQih++ inZS4WYX64tBxMjA=; b=MMo5d/aZOWsy1REPalQjI91qLfAdf6oKeD1zTne80Ib JoRm6oyQCROd64sUYCcU2i8KgQPuAjjiYMoUoiNkxqMjTw6DAAYPaXBPkt6JTniG K5T9or0Otg3USBqjXiGXeVSOh80JGKF0PT+sr7OhWUFKQlUiXc8JyN4X5bni/3DU Vi84Y+Dpl8yE+JaMMeViuebIyZ75VzDNxnf5UgnqO+65nC5qny6oJCtmBTtJ2M7z x1w8QXjkIkm5wWrX+rUJwajlG0GVaPdDziKfE94rDHvJiTFysBu5G6VxQ9IUQQ3C jhmYnVx2DH8i4T2fInFgTqoqSJ28cUZHgJzuOlcDTNw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=G3Oj4n q+TrpPACH7zBkVCDQih++inZS4WYX64tBxMjA=; b=2fWOMBZNqne0Sf4w4wfybY 8kZoVovk514CgcqhaPSh2PxYpcrzpx0P7kXP8+U3AV2giAaQW0IRBiSGzDTXmn/8 fnci59hEO9nMo0/xDheXrVy2JRT0Kk9r79bQd79U/tEnjVj/ysTwozR7YBkSYDsn gcAXpLe98vNfQJFPqJXCfpRWycVqc1TK/AxtCuIhVVj8tC1ieANWe+5Zd8UvNMo0 dV9TqscVC3/TeWN/ZsxwDRk2IHkTwe/0AfJeSXdcAtnYbR+toObduOy3i5oVnq6a LeUCtxcUZ9KLD+uX7xXwfbW1VLQHI8eSHGSSPwYkmK81+yI+yzt0QLszp7R64i3A == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrhedvgdduudejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdljedtmdenucfjughrpeffhf fvuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofhitghhrggvlhcurfgrqhhu ihgvrhcuoehmihgthhgrvghlsehprghquhhivghrrdighiiiqeenucfkphepudduuddrud dtvddrudektddrudekheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id 4F3DB3280059; Thu, 6 Feb 2020 03:08:36 -0500 (EST) Date: Thu, 6 Feb 2020 17:08:33 +0900 From: Michael Paquier To: Jehan-Guillaume de Rorthais Cc: pgsql-bugs@lists.postgresql.org Subject: Re: Another FK violation when referencing a multi-level partitioned table Message-ID: <20200206080833.GL23913@paquier.xyz> References: <20200206004948.238352db@firost> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="nljfjKcp9HDtPSOP" Content-Disposition: inline In-Reply-To: <20200206004948.238352db@firost> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --nljfjKcp9HDtPSOP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Feb 06, 2020 at 12:49:48AM +0100, Jehan-Guillaume de Rorthais wrote: > Please, find in attachment a proposal patch to fix this FK violation. Indeed. I would have expected the deletion of the referenced rows to happen as in your test. At quick glance, your fix looks right, but I need to study more this code. Alvaro, would you like to weigh in as the author of f56f8f8? -- Michael --nljfjKcp9HDtPSOP Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl47yYEACgkQnvQgOdby QH2JOQ//ZVsxfAOtxcpbC8pIGjz2dordl9B0hnK2NlRjR04cJQ9lPZSC3dtdDAIS xBm7xVv8DlGPd9Pz2b7/1+ro49F2neWAN/+9/H5wZvzHmtapNuKFwR4xDZgC1foM IAOiWmSRkOHBE40Ccza4YtH7hSg5blrSWR48WfVCmTfyUTimaZqargWkd3nXkbcj hLfeh0Q1XYvbPh1nnvFN3BNGoXha7lXPiCUQYzGIikN+v/rDZTVkUH31Cwktu80F wtuit/a1rp+LRcWMr/f0MYRVOftaVRVBHqjLRXH3dRnkiggCU4X8fOSHk8l/513j 1y0O6zBYe3j/EtQNY0/PjiLqBEmO+fXEHUbQ2hduNEmS5lOGAbjKZSZddLeVeCYG 5cwN2uUFqOMGywH138norhpkflQEywHJ5XQ3c6NVDcV66c3VnJWDf9MysaH2+r7x GVEOOkLA+2gy5jVQ8JunypzhWGF9Le/YLiAVE4lRQZDRgm6NOi16xpHWeLtDthYC 3++jgNUaVqrHSDZn9pkn8nnPGV8GAAshwPzb5TXVoXtLSYwn9jpCxazr5cHnH/lR 1aNFBgAUxzU9Fk7A+nAagzNmNEfIhvWsAGBcEvdIUL0IVwhgyKwBfEUY7iJyT4Io tK5Kq5VGY505qzF+yUfF9pdVsKDXFVMIB95CvmCoYxlQ/8gAQE4= =hO/N -----END PGP SIGNATURE----- --nljfjKcp9HDtPSOP--