Skip site navigation (1) Skip section navigation (2)

Cannot shutdown subscriber after DROP SUBSCRIPTION

From: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Cannot shutdown subscriber after DROP SUBSCRIPTION
Date: 2017-02-01 08:36:23
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
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


Kyotaro Horiguchi
NTT Open Source Software Center

Attachment: fix_block_by_drop_subscription_v1.patch
Description: text/x-patch (3.3 KB)


pgsql-hackers by date

Next:From: Kyotaro HORIGUCHIDate: 2017-02-01 08:37:48
Subject: Re: IF (NOT) EXISTS in psql-completion
Previous:From: Nikhil SontakkeDate: 2017-02-01 08:29:25
Subject: Re: Speedup twophase transactions

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group