From: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
---|---|
To: | Noah Misch <noah(at)leadboat(dot)com> |
Cc: | Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, 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: Re: Create subscription with `create_slot=false` and incorrect slot name |
Date: | 2017-05-30 19:02:55 |
Message-ID: | 171b74a2-7305-d6af-a87c-c1396ee59068@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 5/29/17 22:26, Noah Misch wrote:
> On Fri, May 26, 2017 at 05:05:37PM -0400, Peter Eisentraut wrote:
>> On 5/25/17 19:16, Petr Jelinek wrote:
>>>> The reported error is just one of many errors that can happen when DROP
>>>> SUBSCRIPTION tries to drop the slot (doens't exist, still active, no
>>>> permission, etc.). We don't want to give the hint that is effectively
>>>> "just forget about the slot then" for all of them. So we would need
>>>> some way to distinguish "you can't do this right now" from "this would
>>>> never work" (400 vs 500 errors).
>>>>
>>> This specific error returns ERRCODE_UNDEFINED_OBJECT error code so we
>>> could check for it and offer hint only for this case.
>>
>> We would have to extend the walreceiver interface a little to pass that
>> through, but it seems doable.
>
> [Action required within three days. This is a generic notification.]
I have just posted a patch earlier in this thread with a possible
solution. If people don't like that approach, then we can pursue the
approach with error codes discussed above. But I would punt that to
PG11 in that case. I will report back on Friday.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Ludovic Vaugeois-Pepin | 2017-05-30 19:14:41 | pg_basebackup error: replication slot "pg_basebackup_2194" already exists |
Previous Message | Peter Eisentraut | 2017-05-30 19:01:05 | Re: Create subscription with `create_slot=false` and incorrect slot name |