Re: Deadlock in ALTER SUBSCRIPTION REFRESH PUBLICATION

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Deadlock in ALTER SUBSCRIPTION REFRESH PUBLICATION
Date: 2017-11-02 20:56:10
Message-ID: 71582aab-85ba-36ec-dec0-bd30e6de2430@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 10/24/17 13:13, Konstantin Knizhnik wrote:
> The reason of this deadlock seems to be clear: ALTER SUBSCRIPTION starts transaction at one node and tries to create slot at other node, which waiting for completion of all active transaction while building scnapshpot.
> Is there any way to avoid this deadlock?

I don't see a way to avoid it in general, unless we come up with a novel
way of creating replication slots.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2017-11-02 21:05:19 Re: MERGE SQL Statement for PG11
Previous Message Nico Williams 2017-11-02 20:54:15 Re: [PATCH] Add ALWAYS DEFERRED option for constraints