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 1izkqr-000455-J1 for pgsql-bugs@arkaria.postgresql.org; Thu, 06 Feb 2020 17:22:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1izkqp-0003eI-N4 for pgsql-bugs@arkaria.postgresql.org; Thu, 06 Feb 2020 17:22:03 +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 1izkqp-0003eB-Ek for pgsql-bugs@lists.postgresql.org; Thu, 06 Feb 2020 17:22:03 +0000 Received: from mail-qk1-x742.google.com ([2607:f8b0:4864:20::742]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1izkqm-0001b3-Sq for pgsql-bugs@lists.postgresql.org; Thu, 06 Feb 2020 17:22:03 +0000 Received: by mail-qk1-x742.google.com with SMTP id w15so6308345qkf.6 for ; Thu, 06 Feb 2020 09:22:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=CA8y2C+hp/3tHJSfYXnN2yKC1wb/dS3ZaHIZT0zVAWQ=; b=mboBNeyZkHdMOUjV7/7cgSHrCgbfRiHIp2FvKCYnBg871vwgc8GRd+vCsHAtW56rFX kxOQye7d/FAE3DDpz0blEShRubfHDxKuP/EhY1b1CbVtIAukrO1u1lD0SEH5+vdE20VR JfYcM64acZojnWQbBS+gVBuJ3gxiePJH1jjjsZ7gBQrdo8BtUy6qOAzC2YUwenPaycFo bApJHDs/uySQKFdfofhlloLH4svLFxOQDtGWKLIG8OtqP0hToEvWNVDDhuV6pI9gzjEW o1X7EbSNnqDoyNbJS2t0X1K5XN/Ns+yRMUSAZQNqGecrgHW8g0/O1ywsAruHzWqrdj46 y56A== 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:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=CA8y2C+hp/3tHJSfYXnN2yKC1wb/dS3ZaHIZT0zVAWQ=; b=pBG71d6scwMvSeaWBz/PTGByVm4CslCUFyJof5otwSMiPV5hqt/nCfmO+QC/KqesfZ ehKpca5UVA5Kl+JVFxVInqVpzuGGDA8jH+i+/mXZ5pR7kPqkBTB3wnlWmhznYK+/NqbY FzdpWujhX8r2EA8UYkZpgFX4wEdmBbDsD3h48VMcsQl/54QdKzkkqMJjQV0EetspEepW V559mbRPzOUEJKlu0oTub5cJFLvgN1VxLikn7LBlgKDuJXwEe9sKZTSDdut++uFaB03G tfuZeR7Sma/0QJ00Pm8X+h29462C6vGHGHX6QtBxNaREXe4Wp8dYoG1mhUJlHT/jdC4q FtFA== X-Gm-Message-State: APjAAAVR+elnUJC/IALoxNtP5k0cJgQcp15NhLdJUh9MIb6fc9c5746c MlEr9tAYgQawtIlrpNihFfhbA/+qFz/qJA== X-Google-Smtp-Source: APXvYqyZg37mELeY1H3AlTzsG4HEC07QjbcjjWXKGIbVHkorhimr/NeYwWd9zHZwsiFExQrFWqSczA== X-Received: by 2002:a37:a24d:: with SMTP id l74mr3343482qke.439.1581009718248; Thu, 06 Feb 2020 09:21:58 -0800 (PST) Received: from nimloth.alvh.no-ip.org ([201.186.208.119]) by smtp.gmail.com with ESMTPSA id p126sm1713800qke.108.2020.02.06.09.21.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Feb 2020 09:21:57 -0800 (PST) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id BDEEF30081F; Thu, 6 Feb 2020 14:21:55 -0300 (-03) Date: Thu, 6 Feb 2020 14:21:55 -0300 From: Alvaro Herrera To: Michael Paquier Cc: Jehan-Guillaume de Rorthais , pgsql-bugs@lists.postgresql.org Subject: Re: Another FK violation when referencing a multi-level partitioned table Message-ID: <20200206172155.GA27899@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200206080833.GL23913@paquier.xyz> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-Feb-06, Michael Paquier wrote: > 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? Sure, I'll have a look at this this afternoon. Kindly do CC me when mentioning me in messages. I don't read every mailing list message ... -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services