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

From: Dmitry Dolgov <9erthalion6(at)gmail(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(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>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Create subscription with `create_slot=false` and incorrect slot name
Date: 2017-06-03 20:19:08
Message-ID: CA+q6zcXH1rHF=y23obvZSsBdM4FtE8feBKFkiLLQ484A5K0Zfw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 26 May 2017 at 23:05, Peter Eisentraut <
peter(dot)eisentraut(at)2ndquadrant(dot)com> 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.

Just to make it clear for me. If I understand correctly, it should be more
or
less easy to extend it in that way, something like in the attached patch.
Or am I missing something?

Attachment Content-Type Size
drop-subscription-hint.patch text/x-patch 2.5 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-06-03 21:10:55 Re: Tweaking tab completion for some backslash commands
Previous Message Peter Eisentraut 2017-06-03 16:53:51 Re: Get stuck when dropping a subscription during synchronizing table