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 1h6DFQ-0002Uu-He for pgsql-hackers@arkaria.postgresql.org; Tue, 19 Mar 2019 11:49:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h6DFP-0005e4-9B for pgsql-hackers@arkaria.postgresql.org; Tue, 19 Mar 2019 11:49:35 +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 1h6DFP-0005dx-1b for pgsql-hackers@lists.postgresql.org; Tue, 19 Mar 2019 11:49:35 +0000 Received: from mail-qt1-x843.google.com ([2607:f8b0:4864:20::843]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h6DFI-0004e4-D1 for pgsql-hackers@postgresql.org; Tue, 19 Mar 2019 11:49:34 +0000 Received: by mail-qt1-x843.google.com with SMTP id k2so21708808qtm.1 for ; Tue, 19 Mar 2019 04:49:27 -0700 (PDT) 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=kcKhFAXczZ5QKO7st1qy+sKpX10TC54nieuHUx0q+0k=; b=uAVloRr9bTYQMtZu7nV3orId2Fu/rCSRm63LLARppcQC9Vu1X6PZpNMKmXXU1tZRi8 cFvqgEG/e7loa3NaVjdL+iHSiOcXMlYpWtSD8AV/5/0C7tH37S48Hh93Tsh43AANpnoF Xlxc+4lO9SbSprcQtC+2pZI4OuRZ28FyHV0An2KoXuhJhyW8c/sCOblYq7C8jsibCc6E WxNS2EHirN4wBs72T+SXVXtOvar5U3d1h2t8ns8s+B2pw2gIkY1dA32X7592zoGAEUQr vEhY5cNXBiZgh3qxswpr2miu36VGI5BDIsRTIHw9iMPCEbwRyM3ui4y6jHSI61ARckyk olUw== 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=kcKhFAXczZ5QKO7st1qy+sKpX10TC54nieuHUx0q+0k=; b=bnSZpFRMg0nJt4Xtn3zlD3vR5W8qsqk1Cul4caVmxfZSpg3ohYvHn25nr4zF53CZD/ VExlnSoZn0u7T3gsiO4KPemTX1tQBhHWN/xt0X3iP2FNNV1Afr1v+xfRdzEk7JjHaXKe E9hwPvvlRkaBsOe2HYx0zmenaDhg/eXN8ISD4sLrzz4kQCf4A1TqsqxI1xaJPbsiAlkC GqGXbu57AdSTCbhEwEDsJ8X7JuVqmOMjVsrELg4EJMHlRQ8g6bjqL3EXEn7Z/X0XF77x WghCiAcKl1nUnZO4/jfYzQGeSmIlSRst/re3s2Pqxxw82xtPYqvgsfG8+j7ifZE5SAwu gpVA== X-Gm-Message-State: APjAAAVVU83xojMYV1JcJZ6/dGFRrIYFAh3rXud3bq/Adp3ULPNCongN KmscjJFvZicvyI8sVtAfXxWuUFijH1COpw== X-Google-Smtp-Source: APXvYqySX2hbB7rXVLb0V319MUZtTJmBShXhtIovv+ewkUljR3nPoQ+gmCKi7v0QF3ozCsS4bxMnRQ== X-Received: by 2002:ac8:3032:: with SMTP id f47mr1567812qte.105.1552996166313; Tue, 19 Mar 2019 04:49:26 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id q51sm212009qte.29.2019.03.19.04.49.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Mar 2019 04:49:25 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id E46201218F6; Tue, 19 Mar 2019 08:49:20 -0300 (-03) Date: Tue, 19 Mar 2019 08:49:20 -0300 From: Alvaro Herrera To: Amit Langote Cc: Pg Hackers Subject: Re: partitioned tables referenced by FKs Message-ID: <20190319114920.GA10432@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Mar-19, Amit Langote wrote: > Will it suffice or be OK if we skipped invoking the pre-drop callback for > objects that are being "indirectly" dropped? I came up with the attached > patch to resolve this problem, if that idea has any merit. We also get > slightly better error message as seen the expected/foreign_key.out changes. I don't think this works ... consider putting some partition in a different schema and then doing DROP SCHEMA CASCADE. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services