From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Cc: michael.paquier@gmail.com
Cc: masao.fujii@gmail.com
Cc: pgsql-hackers@postgresql.org
Subject: Re: Cannot shutdown subscriber after DROP SUBSCRIPTION
Date: Thu, 02 Feb 2017 00:13:12 -0500
Message-ID: <1289.1486012392@sss.pgh.pa.us> (raw)
In-Reply-To: <20170202.120215.152968214.horiguchi.kyotaro@lab.ntt.co.jp>
References: <20170201.173623.66249355.horiguchi.kyotaro@lab.ntt.co.jp>
<CAHGQGwHROm3=XuiT3O_BJn8e4WrohGpoK29+5t03+3yAxUgThQ@mail.gmail.com>
<CAB7nPqR6VQ7aiKck1Ao3_mPVvn4v4ZKnJFq2oawFqpaePHd18A@mail.gmail.com>
<20170202.120215.152968214.horiguchi.kyotaro@lab.ntt.co.jp>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, horiguchi.kyotaro@lab.ntt.co.jp, michael.paquier@gmail.com, masao.fujii@gmail.com
Subject: Re: Cannot shutdown subscriber after DROP SUBSCRIPTION
In-Reply-To: <1289.1486012392@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox