Re: Cannot shutdown subscriber after DROP SUBSCRIPTION

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Cannot shutdown subscriber after DROP SUBSCRIPTION
Date: 2017-02-01 23:46:11
Message-ID: CAB7nPqR6VQ7aiKck1Ao3_mPVvn4v4ZKnJFq2oawFqpaePHd18A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Feb 2, 2017 at 2:14 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2017-02-02 00:17:46 Re: Time to up bgwriter_lru_maxpages?
Previous Message Andres Freund 2017-02-01 23:36:53 Re: TRAP: FailedAssertion("!(hassrf)", File: "nodeProjectSet.c", Line: 180)