From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
---|---|
To: | Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Cannot shutdown subscriber after DROP SUBSCRIPTION |
Date: | 2017-02-01 17:14:21 |
Message-ID: | CAHGQGwHROm3=XuiT3O_BJn8e4WrohGpoK29+5t03+3yAxUgThQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Feb 1, 2017 at 5:36 PM, Kyotaro HORIGUCHI
<horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> wrote:
> Hello, while looking another bug, I found that standby cannot
> shutdown after DROP SUBSCRIPTION.
>
> standby=# CREATE SUBSCRPTION sub1 ...
> standby=# ....
> standby=# DROP SUBSCRIPTION sub1;
>
> Ctrl-C to the standby fails to work. ApplyLauncherMain is waiting
> LogicalRepLauncherLock forever.
>
> The culprit is DropSbuscription. It acquires
> LogicalRepLauncherLock but never releases.
>
> The attached patch fixes it. Most part of the fucntion is now
> enclosed by PG_TRY-CATCH since some functions can throw
> exceptions.
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?
Regards,
--
Fujii Masao
From | Date | Subject | |
---|---|---|---|
Next Message | David Fetter | 2017-02-01 17:18:40 | Re: [COMMITTERS] pgsql: Make psql's \set display variables in alphabetical order. |
Previous Message | Robert Haas | 2017-02-01 16:34:02 | Re: parallelize queries containing subplans |