Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d5fAb-0006hy-4L for pgsql-hackers@arkaria.postgresql.org; Tue, 02 May 2017 21:17:17 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1d5fAa-0001XW-3k for pgsql-hackers@arkaria.postgresql.org; Tue, 02 May 2017 21:17: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 1d5f94-0007Ig-DS for pgsql-hackers@postgresql.org; Tue, 02 May 2017 21:15:42 +0000 Received: from mail-qk0-x22e.google.com ([2607:f8b0:400d:c09::22e]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1d5f8v-0006ZW-Hg for pgsql-hackers@postgresql.org; Tue, 02 May 2017 21:15:40 +0000 Received: by mail-qk0-x22e.google.com with SMTP id q1so54596144qkd.2 for ; Tue, 02 May 2017 14:15:33 -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=tAaYwu/EGn9DvgZB5iWKRnNZKtTKwQVRVgvrx34u/74=; b=2BmsLKbjF+lbQnWdgFpHuN9FxfZr05ymM9pc/M5oOsIxNZsGk0P0mtSIu1yFxAxvMg YQUSJF8tsydEyuTrZCrXPX8ArYfaCSlTaaAxZrZGojpHD/KwsdM9SHcyJHccAS/Gd5uA nUykp7Onw3rmQyCaJ7tm8m6EOMLSUpa2V32isXiOREPKW3NAi28e2/AIYI+uK6RpbZaD WXTWgKVUXgxIhTnaT9HWtgIhqW45NGH1CcX0ZM2CU43T7YF5rcH6spEPbV1uGXL3gol8 Nq6b53jmXFBD2jf8f3LQpvTmTEovUeJP7NjPaQNxcsB0NXWaReHzf2t8NhsxlTgTiMgc 2Ptw== 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=tAaYwu/EGn9DvgZB5iWKRnNZKtTKwQVRVgvrx34u/74=; b=lbCMJxWkxFAakpVsHj4DjjgEPONHnD5BrLzdViYHMZqrlGOxmRXPD/zyO+QCY79V0Q +AxUYbVW8ba9m1ct1fLarCp5+p4LH/iQYKivXbpzKeSt3eH0GL4osp/8+SC4uVYytU5M EGMTKDLMb6h5EEUcJoj15VUXuFP4tk5DrtQMbiLEVNsK7xLx3L7OvIV1hh1lb4YR6PUv uj1tI5PlUYAMo+CpDf031EdNiItn6Q1X98Uahcj6pFnfxcolf7bGBTM31OUgtyfVnF1F CTISNvfVHHRDRZgZfUqJYMlI1B+Qkun/LpmQ8sCsT/g12n8TXPiu4FlPmW22eqz1ZPcC YjAQ== X-Gm-Message-State: AN3rC/7m4+yF91LvvBczDSkY23z9CRhhLfTEOxDNNmZ8Yfptvz4Fk7FM vS39gmQWkkAMKhuN X-Received: by 10.55.90.2 with SMTP id o2mr29907091qkb.251.1493759731578; Tue, 02 May 2017 14:15:31 -0700 (PDT) Received: from alvin.alvh.no-ip.org ([179.57.115.10]) by smtp.gmail.com with ESMTPSA id d198sm749591qkb.1.2017.05.02.14.15.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 May 2017 14:15:31 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 57154493; Tue, 2 May 2017 18:15:30 -0300 (-03) Date: Tue, 2 May 2017 18:15:30 -0300 From: Alvaro Herrera To: Robert Haas Cc: Petr Jelinek , Tom Lane , Michael Paquier , PostgreSQL mailing lists Subject: Re: logical replication syntax (was DROP SUBSCRIPTION, query cancellations and slot handling) Message-ID: <20170502211530.knjb72uo2lykuzxt@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: NeoMutt/20170306-137-4415bd-dirty (1.8.0) X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Robert Haas wrote: > On Tue, May 2, 2017 at 12:25 PM, Alvaro Herrera > wrote: > > 2) don't drop because we know it won't work. I see two options: > > c) ignore a drop slot failure, i.e. don't cause a transaction abort. > > An easy way to implement this is just add a PG_TRY block, but we > > dislike adding those and not re-throwing the error. > > Dislike doesn't seem like the right word. Unless you rollback a > (sub)transaction, none of the cleanup that would normally do is done, True. So one possible implementation is that we open a subtransaction before dropping the slot, and we abort it if things go south. This is a bit slower, but not critically so. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers