Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7piX-0000Bf-TV for pgsql-hackers@arkaria.postgresql.org; Mon, 08 May 2017 20:57:18 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1d7piW-0005bP-IW for pgsql-hackers@arkaria.postgresql.org; Mon, 08 May 2017 20:57: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 1d7ph0-0002x3-Sv for pgsql-hackers@postgresql.org; Mon, 08 May 2017 20:55:43 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1d7pgx-0003kd-CM for pgsql-hackers@postgresql.org; Mon, 08 May 2017 20:55:42 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id AA54220A4E; Mon, 8 May 2017 16:55:37 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute7.internal (MEProxy); Mon, 08 May 2017 16:55:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=HaMSSH0DraEvLWz9ZgqlGqkj3fkfvF4VyIwaXPdlTHw=; b=oq5I+bcg GTCO+Ug/dzh7c/x/2tW2t/m+Ut1XxdY4qT9QDie8Bcp9XZDyupD78Gq1vuVkdasb Lq6q35yBj/Wx/YGXZo+PKYdLA3Tm8+ed7hoErdnBei7BtB4O0SdRZ0DR1SjqBrct PWpKes4Y6fAvODSTVXpKGay1GAgseQR4CkHgvGgFSlbYiHPk0rfh0KIRhb/ROG+9 7YHzj72uXq8ME+50Tfxkp+LleIgvsLxKFkOOo0NqUsrNZH9/r/GmnMsOiSbNlvV5 6AgkegqnzInY+osAL1M2ZV3lbUtFgbtbSIBOU3HhGp5nViRbT4137aQJuMukDwn3 +RgHUmRicNXZOg== X-ME-Sender: X-Sasl-enc: Z1VoOQ5/HoTqX91dEkOeeUx1L+Qc4qNlkY0aOldrNPtR 1494276937 Received: from april.local (c-73-13-66-39.hsd1.pa.comcast.net [73.13.66.39]) by mail.messagingengine.com (Postfix) with ESMTPA id 4F3072415E; Mon, 8 May 2017 16:55:37 -0400 (EDT) Subject: Re: logical replication syntax (was DROP SUBSCRIPTION, query cancellations and slot handling) To: Petr Jelinek , Tom Lane References: <27478.1493727233@sss.pgh.pa.us> <29431.1493730652@sss.pgh.pa.us> <360a1932-7af4-609b-94f1-2ad419430869@2ndquadrant.com> <9174dc31-787a-a2f6-818f-cb4a5c1dfddb@2ndquadrant.com> <30166.1493731904@sss.pgh.pa.us> Cc: Robert Haas , Michael Paquier , PostgreSQL mailing lists From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: <2b931e0e-d9f2-c79e-b74b-91df2f915e66@2ndquadrant.com> Date: Mon, 8 May 2017 16:55:36 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit 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 On 5/5/17 13:01, Petr Jelinek wrote: > What do you think of attached. I actually did add RESTRICT/CASCADE, in a > way that if there is slot RESTRICT will refuse to drop subscription and > CASCADE will try to drop it. Still all errors. > > The new way to not drop slot is to set slot_name to NONE which is new > value that I invented (inspiration from OWNED BY sequences) which > basically disassociates the subscription from slot. > > It's slightly less automatic this way but perhaps that's not a bad > thing, at least nobody will drop slots by mistake while we still make > sure that slots are not left over without anybody noticing. I think this is OK. Could you send a version of this patch based on master please? -- Peter Eisentraut http://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