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 <michael.paquier@gmail.com>)
Ответы Re: [HACKERS] Cannot shutdown subscriber after DROP SUBSCRIPTION  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
At Thu, 2 Feb 2017 08:46:11 +0900, Michael Paquier <michael.paquier@gmail.com> wrote in
<CAB7nPqR6VQ7aiKck1Ao3_mPVvn4v4ZKnJFq2oawFqpaePHd18A@mail.gmail.com>
> On Thu, Feb 2, 2017 at 2:14 AM, Fujii Masao <masao.fujii@gmail.com> 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 по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] sequence data type
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] pg_background contrib module proposal