Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ee28L-0001aM-1i for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Jan 2018 17:13:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ee28K-000512-Es for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Jan 2018 17:13:16 +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.84_2) (envelope-from ) id 1ee28J-00050p-Vv for pgsql-hackers@lists.postgresql.org; Tue, 23 Jan 2018 17:13:16 +0000 Received: from mail-wm0-x234.google.com ([2a00:1450:400c:c09::234]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ee28G-0005bm-O4 for pgsql-hackers@postgresql.org; Tue, 23 Jan 2018 17:13:15 +0000 Received: by mail-wm0-x234.google.com with SMTP id v71so3385668wmv.2 for ; Tue, 23 Jan 2018 09:13:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=tnmbc+EEcHjrcVSLYE/lWHGYoQNMcey+z8I0FdotiSI=; b=nbRRSFq8JAe1QnCBW7woktIJ0vGdxa6V/h4mKCzLfHHwPpW5XnSoJxQfv1T1g7SdMY sZiLi/LCUvf4p8jXeCm+O15nkz+EUG/DKpgEsBV/8bErpj06KrLYXU9Yls5JGTNiHj8J W1FXiVkERZuBmtJY0lcZVus0o8VnWE0xbMy9DNC5TAJQWDih/L1hyLaD8CrK2WZHdYh1 XO4sA2XKgXCqWuTmAFYzoe8L3z/3IaMGGYzX1VbSOP4HCR/vhSTEoNf9mN0fqPZc5LOo 3ymGeWDivf4ab7X281s4/uidDMKUPLldyn0gsa+EU2+h83IYbBXj+0eo3UrF6tfMy68O QdMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=tnmbc+EEcHjrcVSLYE/lWHGYoQNMcey+z8I0FdotiSI=; b=GY5BjiyswXaEjHGKSzko8tIntoWTGlWTpl3U2CYVuFVkopIJxYkzC3n/VbKtIpidXI Lf8bYIMxpmHlD9T6tE3jMBVZelgqy3gmLg9rZb+rFMs7vAlHXsAG5pzI7y/AqPdfxkd6 ZoGYPuEY35gxdFetuztyIitdgyuHxG2d1YsK1uyq0w/w7WsFzG/Wmpm2L4qkewHAEN8I 0G9ARvWhg4MjWP/oU19vCGvHNWzBywGzuvnkPSb4Hh7WSxuzSTDGqAtssX0KAYePpvGI guUnx17V6hRS3kCcp2P42IoNdAd0hd7dd+rTGpopa/EBmPcCzrGAYM7bFfFuGipiLwPg e5ZA== X-Gm-Message-State: AKwxytcdzUHxkvWMvyckEX+f2B+4RSpdsDq2Ff6vP8xRrpBJO4/kPIpJ 2dtoUPyeK32I3tE1XQdSea5+c01UdjfruFN26N0rr820JebV38I8ND57/j4ORHrsgGYGgF79GNe g0fW7MRYxlX6P71hHjGYT6r5SPCmXzwHRA1lZFlNpJfQ6BLnC9KH3nBbv6ypdkzL0dBgX+QC1Ho fdj92hCRUI60w= X-Google-Smtp-Source: AH8x226I5/8NXwH+PAkgoU03UdjMmpTeQDU1pRBsq+e2wr10Dz3EZGPiwGKoGpJZtZuTUTjL8HtJNA== X-Received: by 10.28.100.213 with SMTP id y204mr2568472wmb.24.1516727590995; Tue, 23 Jan 2018 09:13:10 -0800 (PST) Received: from [192.168.0.106] (150.123.broadband11.iol.cz. [90.178.123.150]) by smtp.gmail.com with ESMTPSA id f19sm7863305wmf.23.2018.01.23.09.13.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Jan 2018 09:13:10 -0800 (PST) Subject: Re: [PATCH] Logical decoding of TRUNCATE To: Marco Nenciarini , Simon Riggs Cc: PostgreSQL-development References: <269bf0d2-6ac4-c032-6979-22aad6a9f5fb@2ndquadrant.it> <20171229195536.cdzmgllfkln6wo6t@alap3.anarazel.de> <35a1d60b-f66d-4001-499b-2336ca81fc6c@2ndquadrant.it> <1a4ace10-1997-6644-d17a-5a17bf250270@2ndquadrant.it> <28a59551-b1f5-8ed4-65cf-76d17e7ee7e6@2ndquadrant.it> <1cb9bd52-9e3a-21bf-0c0c-afa90f463629@2ndquadrant.com> From: Petr Jelinek Message-ID: Date: Tue, 23 Jan 2018 18:13:09 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On 23/01/18 15:38, Marco Nenciarini wrote: > Il 22/01/18 23:18, Petr Jelinek ha scritto: >> On 22/01/18 19:45, Petr Jelinek wrote: >> >> Actually on second look, I don't like the new boolean parameter much. >> I'd rather we didn't touch the input list and always close only >> relations opened inside the ExecuteTruncateGuts(). >> >> It may mean more list(s) but the current interface is still not clean. >> > > Now ExecuteTruncateGuts unconditionally closes the relations that it > opens. The caller has now always the responsibility to close the > relations passed with the explicit_rels list. This looks good. > > Version 15 attached. > I see you still do CASCADE on the subscriber though. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services