Re: [HACKERS] Cannot shutdown subscriber after DROP SUBSCRIPTION
От
Kyotaro HORIGUCHI
Тема
Re: [HACKERS] Cannot shutdown subscriber after DROP SUBSCRIPTION
Дата
Msg-id
20170202.120215.152968214.horiguchi.kyotaro@lab.ntt.co.jp
Ответ на
Re: [HACKERS] Cannot shutdown subscriber after DROP SUBSCRIPTION (Michael Paquier)
Список
Дерево обсуждения
[HACKERS] Cannot shutdown subscriber after DROP SUBSCRIPTION Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Re: [HACKERS] Cannot shutdown subscriber after DROP SUBSCRIPTION Fujii Masao <masao.fujii@gmail.com>
Re: [HACKERS] Cannot shutdown subscriber after DROP SUBSCRIPTION Michael Paquier <michael.paquier@gmail.com>
Re: [HACKERS] Cannot shutdown subscriber after DROP SUBSCRIPTION Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Re: [HACKERS] Cannot shutdown subscriber after DROP SUBSCRIPTION Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Cannot shutdown subscriber after DROP SUBSCRIPTION Michael Paquier <michael.paquier@gmail.com>
Re: [HACKERS] Cannot shutdown subscriber after DROP SUBSCRIPTION Fujii Masao <masao.fujii@gmail.com>
Re: [HACKERS] Cannot shutdown subscriber after DROP SUBSCRIPTION Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Re: [HACKERS] Cannot shutdown subscriber after DROP SUBSCRIPTION Fujii Masao <masao.fujii@gmail.com>
Re: [HACKERS] Cannot shutdown subscriber after DROP SUBSCRIPTION Fujii Masao <masao.fujii@gmail.com>
Re: [HACKERS] Cannot shutdown subscriber after DROP SUBSCRIPTION Petr Jelinek <petr.jelinek@2ndquadrant.com>
Re: [HACKERS] Cannot shutdown subscriber after DROP SUBSCRIPTION Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] Cannot shutdown subscriber after DROP SUBSCRIPTION Fujii Masao <masao.fujii@gmail.com>
Re: [HACKERS] Cannot shutdown subscriber after DROP SUBSCRIPTION Petr Jelinek <petr.jelinek@2ndquadrant.com>
Re: [HACKERS] Cannot shutdown subscriber after DROP SUBSCRIPTION Fujii Masao <masao.fujii@gmail.com>
Re: [HACKERS] Cannot shutdown subscriber after DROP SUBSCRIPTION Masahiko Sawada <sawada.mshk@gmail.com>
Re: [HACKERS] Cannot shutdown subscriber after DROP SUBSCRIPTION Fujii Masao <masao.fujii@gmail.com>
At Thu, 2 Feb 2017 08:46:11 +0900, Michael Paquier wrote in
> On Thu, Feb 2, 2017 at 2:14 AM, Fujii Masao wrote:
> > The lwlock would be released when an exception occurs, so I don't think
> > that TRY-CATCH is necessary here. Or it's necessary for another reason?
>
> + PG_CATCH();
> + {
> + LWLockRelease(LogicalRepLauncherLock);
> + PG_RE_THROW();
> + }
> + PG_END_TRY();
> Just to do that, a TRY/CATCH block looks like an overkill to me. Why
> not just call LWLockRelease in the ERROR and return code paths?
I though the same first. The modification at the "if (wrconn =="
is the remains of that. It is reverted inthe attached patch.
Then, the reason for the TRY-CATCH cluase is that I found that
some functions called from there can throw exceptions.
logicalrep_worker_stop and replorigin_drop have ereport in its path.
load_library apparently can throw exception.
(walrcv_(libpq_) functions don't seeem to.)
regards,
--
Kyotaro Horiguchi
NTT Open Source Software Center
В списке pgsql-hackers по дате отправления