Re: [HACKERS] Refreshing subscription relation state inside atransaction block - Mailing list pgsql-hackers

From Masahiko Sawada
Subject Re: [HACKERS] Refreshing subscription relation state inside atransaction block
Date
Msg-id CAD21AoAmBcrMf0W=Czzjc1=zk_rRSFjUUJozwxxNN5ou19FNug@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Refreshing subscription relation state inside atransaction block  (Masahiko Sawada <sawada.mshk@gmail.com>)
Responses Re: [HACKERS] Refreshing subscription relation state inside atransaction block
List pgsql-hackers
On Wed, Jun 14, 2017 at 1:02 AM, Masahiko Sawada <sawada.mshk@gmail.com> wrote:
> On Tue, Jun 13, 2017 at 4:53 PM, Petr Jelinek
> <petr.jelinek@2ndquadrant.com> wrote:
>> On 13/06/17 09:06, Masahiko Sawada wrote:
>>> Hi,
>>>
>>> The commit ddd7b22b225ae41d16ceb218b387645cb9becfdc makes table sync
>>> workers stop when subscription relation entry is removed. It doesn't
>>> work fine inside transaction block. I think we should disallow to use
>>> the following subscription DDLs inside a transaction block. Attached
>>> patch.
>>>
>>
>> Can you be more specific than "It doesn't work fine inside transaction
>> block", what do you expect to happen and what actually happens?
>>
>
> If we do ALTER SUBSCRIPTION SET PUBLICATION during executing table
> sync then it forcibly stops concurrently running table sync worker for
> a table that had been removed from pg_subscription_rel.

Also, until commit the transaction the worker cannot launch new table
sync worker due to conflicting tuple lock on pg_subscription_rel.

Regards,

--
Masahiko Sawada
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [HACKERS] WIP: Data at rest encryption
Next
From: Robert Haas
Date:
Subject: Re: [HACKERS] remove unnecessary flag has_null from PartitionBoundInfoData