Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cZ9hw-0003er-Ne for pgsql-hackers@arkaria.postgresql.org; Thu, 02 Feb 2017 05:13:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cZ9hw-0000tl-5g for pgsql-hackers@arkaria.postgresql.org; Thu, 02 Feb 2017 05:13:20 +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.84_2) (envelope-from ) id 1cZ9hv-0000qz-5S for pgsql-hackers@postgresql.org; Thu, 02 Feb 2017 05:13:19 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cZ9hs-0002u1-On for pgsql-hackers@postgresql.org; Thu, 02 Feb 2017 05:13:17 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v125DCnu001290; Thu, 2 Feb 2017 00:13:12 -0500 From: Tom Lane To: Kyotaro HORIGUCHI cc: michael.paquier@gmail.com, masao.fujii@gmail.com, pgsql-hackers@postgresql.org Subject: Re: Cannot shutdown subscriber after DROP SUBSCRIPTION In-reply-to: <20170202.120215.152968214.horiguchi.kyotaro@lab.ntt.co.jp> References: <20170201.173623.66249355.horiguchi.kyotaro@lab.ntt.co.jp> <20170202.120215.152968214.horiguchi.kyotaro@lab.ntt.co.jp> Comments: In-reply-to Kyotaro HORIGUCHI message dated "Thu, 02 Feb 2017 12:02:15 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1288.1486012392.1@sss.pgh.pa.us> Date: Thu, 02 Feb 2017 00:13:12 -0500 Message-ID: <1289.1486012392@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) 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 Kyotaro HORIGUCHI writes: > Then, the reason for the TRY-CATCH cluase is that I found that > some functions called from there can throw exceptions. Yes, but all LWLocks should be released by normal error recovery. It should not be necessary for this code to clean that up by hand. If it were necessary, there would be TRY-CATCH around every single LWLockAcquire in the backend, and we'd have an unreadable and unmaintainable system. Please don't add a TRY-CATCH unless it's *necessary* -- and you haven't explained why this one is. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers