Re: [HACKERS] Cannot shutdown subscriber after DROP SUBSCRIPTION - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [HACKERS] Cannot shutdown subscriber after DROP SUBSCRIPTION
Date
Msg-id CAB7nPqR6VQ7aiKck1Ao3_mPVvn4v4ZKnJFq2oawFqpaePHd18A@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Cannot shutdown subscriber after DROP SUBSCRIPTION  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: [HACKERS] Cannot shutdown subscriber after DROP SUBSCRIPTION  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
List pgsql-hackers
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?
-- 
Michael



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [HACKERS] TRAP: FailedAssertion("!(hassrf)", File:"nodeProjectSet.c", Line: 180)
Next
From: Jim Nasby
Date:
Subject: Re: [HACKERS] Time to up bgwriter_lru_maxpages?