Re: Create subscription with `create_slot=false` and incorrect slot name

From: Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Kuntal Ghosh <kuntalghosh(dot)2007(at)gmail(dot)com>, Euler Taveira <euler(at)timbira(dot)com(dot)br>, Dmitry Dolgov <9erthalion6(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Create subscription with `create_slot=false` and incorrect slot name
Date: 2017-06-01 12:20:23
Message-ID: 0828e5c2-9da1-baee-cafc-d32a3e2b9261@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 01/06/17 04:44, Peter Eisentraut wrote:
> On 5/31/17 09:40, Robert Haas wrote:
>> On Tue, May 30, 2017 at 3:01 PM, Peter Eisentraut
>> <peter(dot)eisentraut(at)2ndquadrant(dot)com> wrote:
>>> On 5/25/17 17:26, Peter Eisentraut wrote:
>>>> Another way to fix this particular issue is to not verify the
>>>> replication slot name before doing the drop. After all, if the name is
>>>> not valid, then you can also just report that it doesn't exist.
>>>
>>> Here is a possible patch along these lines.
>>
>> I don't see how this solves the problem. Don't you still end up with
>> an error message telling you that you can't drop the subscription, and
>> no guidance as to how to fix it?
>
> Well, the idea was to make the error message less cryptic.
>
> But I notice that there is really little documentation about this. So
> how about the attached documentation patch as well?
>
> As mentioned earlier, if we want to do HINT messages, that will be a bit
> more involved and probably PG11 material.
>

I think the combination of those patches is probably good enough
solution for PG10 (I never understood the need for name validation in
ReplicationSlotAcquire() anyway).

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2017-06-01 13:10:16 Re: ALTER INDEX .. SET STATISTICS ... behaviour
Previous Message Petr Jelinek 2017-06-01 12:17:44 Re: logical replication busy-waiting on a lock