Re: logical replication syntax (was DROP SUBSCRIPTION, query cancellations and slot handling)

From: Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: logical replication syntax (was DROP SUBSCRIPTION, query cancellations and slot handling)
Date: 2017-05-09 15:43:21
Message-ID: 20856826-de0f-f630-4c67-36dca21037ad@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 09/05/17 16:28, Peter Eisentraut wrote:
> On 5/9/17 04:39, Petr Jelinek wrote:
>>>> What we want to simulate instead is an "auto" dependency of the slot on
>>>> the subscription. So you can drop the slot separately (subject to other
>>>> restrictions), and it is dropped automatically when the subscription is
>>>> dropped. To avoid that, you can disassociate the slot from the
>>>> subscription, which you have implemented.
>>>>
>>>> I think we can therefore do without RESTRICT/CASCADE here. If a slot is
>>>> associated with the subscription, it should be there when we drop the
>>>> subscription. Otherwise, the user has to disassociate the slot and take
>>>> care of it manually. So just keep the "cascade" behavior.
>>>>
>>>> Similarly, I wouldn't check first whether the slot exists. If the
>>>> subscription is associated with the slot, it should be there.
>>>
>>> Here is your patch amended for that.
>>
>> I am fine with this mechanism as well.
>
> Committed.
>
> I also wrote a bit of documentation about slot handling for
> subscriptions, covering some of what was discussed in this thread.
>

Great, thanks.

Here is rebased version of the other patch (the interface rework). I
also fixed the tab completion there.

--
Petr Jelinek http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachment Content-Type Size
Rework-the-options-for-logical-replication-v2.patch binary/octet-stream 60.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2017-05-09 16:15:14 Re: proposal psql \gdesc
Previous Message Pavel Stehule 2017-05-09 15:40:41 export import bytea from psql