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 1fdeTd-0004FS-Su for pgsql-hackers@arkaria.postgresql.org; Thu, 12 Jul 2018 16:29: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 1fdeTc-0006wi-6a for pgsql-hackers@arkaria.postgresql.org; Thu, 12 Jul 2018 16:29:56 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fdeTb-0006wa-PO for pgsql-hackers@lists.postgresql.org; Thu, 12 Jul 2018 16:29:56 +0000 Received: from mail-qk0-x241.google.com ([2607:f8b0:400d:c09::241]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fdeTY-0005ax-9y for pgsql-hackers@postgresql.org; Thu, 12 Jul 2018 16:29:54 +0000 Received: by mail-qk0-x241.google.com with SMTP id u21-v6so15740343qku.2 for ; Thu, 12 Jul 2018 09:29:52 -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=RjI8/dd/hNSq0IZUePdUAFEd4CwNISids1gZnZ8937o=; b=HwCoZFakQ3kuIUdsNg97cdapHgepTbE+TJeK4/7+jAIvazDug0fE/UJAoLWYQb/G5q VbddYG2F0+0F4yLhSbfXkWY3M31OyztJi0/9OMrYDAr0yN3H23H4OJ582bpC4RQq3aoN lFO/gQlZ9rFzzj5CxKIuzewvT8EH5aDwq010cRn0Ge1S4gB/6MyxlDtmGAs+JuUFZ8bW AhUEsjsEADjq5Yz7QQ85CcuxtFVnueJsMz855g9R9v/6wrb6M+Iqx4dyWCPb9MFXS8yQ qTjR8/52Ngxi0E33HLwMHz5z0lXxKu7pUas4iGHz9yLclJkc0YaoMiw3jErnC09085CZ 4BXw== 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=RjI8/dd/hNSq0IZUePdUAFEd4CwNISids1gZnZ8937o=; b=qk/G+8W6schl+mtQlGWJmR0pYpGpADcmlk5V1eG5pxsTTk/xR4qZQEb7dnxg5mIQyI E/Dqnf8W5Kl9rM9x14rFEg1vmKyGgs2xEKch7H+nvKN5+c9Fbwjoiy3GEjkDBByOoCcq 6a10gC5nnkrKJUPkwYjIR1pFqG8zSQbjqfPwl74Sc7MAITH2E3WU+xtG6IDJ5Gbcb5ra e5JYn+f6mVvKr92TrXhEVwuaS62T4ivZU3CUDNzccle5Jzf3IWlQT57sjhXKDhMKs9Lc g+l2oLwC30ZDiWoG2krmqbSNGOgu7E0DAnf6q1Z9I+fTXsr+w/0FAFfl7SuuuPK56OG9 2N/A== X-Gm-Message-State: AOUpUlGoYMw1Cs6XofuAqvWl7MdbD2k+K2VMPUSSYTPeiD+IA1iEeZ2N anb6DF2meTBDrC+k5T73bF8Qkg== X-Google-Smtp-Source: AAOMgpf/lMSPqp16kqK8u6i52KXH7krINOa2Eu6DAhUnhezBUqKaQGPw8YcSNxP8ExG5ZanXyiQhRw== X-Received: by 2002:a37:2ac7:: with SMTP id q68-v6mr2419651qkq.374.1531412991344; Thu, 12 Jul 2018 09:29:51 -0700 (PDT) Received: from alvin.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id k66-v6sm14532096qkc.86.2018.07.12.09.29.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Jul 2018 09:29:50 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id BE2A113B6; Thu, 12 Jul 2018 12:29:48 -0400 (-04) Date: Thu, 12 Jul 2018 12:29:48 -0400 From: Alvaro Herrera To: Michael Paquier Cc: Pg Hackers Subject: Re: TRUNCATE tables referenced by FKs on partitioned tables Message-ID: <20180712162948.znhmcvbvbekji4ow@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180712025308.GA7352@paquier.xyz> User-Agent: NeoMutt/20170306-137-4415bd-dirty (1.8.0) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2018-Jul-12, Michael Paquier wrote: > On Wed, Jul 11, 2018 at 06:59:16PM -0400, Alvaro Herrera wrote: > > Anyway, this patch seems to fix it, and adds what I think is appropriate > > test coverage. > > This looks good to me. I am noticing that the documentation of TRUNCATE > does not mention that when running the command on a partitioned table > then it automatically gets to the children even if CASCADE is not used > and each child partition is not listed. Hmm ... well, that's not new -- I think that came in with pg10. > What is the filler column added in truncpart used for? Nothing. Also column b -- I had an additional different test, but then I discovered it wasn't testing anything new. Removed both. Pushed, thanks for looking! -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services