Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dsuWj-00059S-Gp for pgsql-hackers@arkaria.postgresql.org; Fri, 15 Sep 2017 17:35:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dsuWi-0000gE-TU for pgsql-hackers@arkaria.postgresql.org; Fri, 15 Sep 2017 17:35:40 +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 1dsuWh-0000fG-LI for pgsql-hackers@postgresql.org; Fri, 15 Sep 2017 17:35:39 +0000 Received: from mail.postgrespro.ru ([93.174.131.138]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dsuWa-0002eG-7w for pgsql-hackers@postgresql.org; Fri, 15 Sep 2017 17:35:39 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id 99C8C21C1D09; Fri, 15 Sep 2017 20:35:30 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at postgrespro.ru Received: from ars-thinkpad (unknown [192.168.27.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id 6613121C16A3; Fri, 15 Sep 2017 20:35:30 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1505496930; bh=WkxEPDaCUmkCcbyVB51MTSIlP1fyhI1PPAFvAoYm/gE=; h=From:To:Cc:Subject:References:Date:In-Reply-To; b=jsau1FFWoeSV0O4YcbBxVYaAzfyr8TORY4By/TTqgVA3qPYRxh/FGXEddTh6gIviF eA5eNzsmtWGarVd3KNF0vcS16Tq2h4J32pUGxa0ue77kWcu1deVVA1qYM5Iv6fjRVk TDXyWidXVPHR6u+BjCYEIl3q5FYMptmo2n+8hxLs= From: Arseny Sher To: Peter Eisentraut Cc: Tom Lane , pgsql-hackers@postgresql.org, Masahiko Sawada Subject: Re: DROP SUBSCRIPTION hangs if sub is disabled in the same transaction References: <87mv6av84w.fsf@ars-thinkpad> <48b251c6-0652-c131-975a-835d8cdb003c@2ndquadrant.com> <10937.1505245906@sss.pgh.pa.us> <87shfqsw22.fsf@ars-thinkpad> <87o9qd6p13.fsf@ars-thinkpad> <4a3d7e55-1f57-f501-d5ac-2adff9256878@2ndquadrant.com> Date: Fri, 15 Sep 2017 20:35:30 +0300 In-Reply-To: <4a3d7e55-1f57-f501-d5ac-2adff9256878@2ndquadrant.com> (Peter Eisentraut's message of "Fri, 15 Sep 2017 09:52:26 -0400") Message-ID: <87mv5v50gt.fsf@ars-thinkpad> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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 Peter Eisentraut writes: > Here is a simple patch that fixes this, based on my original proposal > point #4. I checked, it passes the tests and solves the problem. However, isn't this + if (slotname || !subenabled) is a truism? Is it possible that subscription has no slot but still enabled? Besides, we can avoid stopping the workers if subscription has no associated replication origin, though this probably means that subscription was broken by user and is not worth it. -- Arseny Sher -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers