Re: [HACKERS] Create subscription with `create_slot=false` andincorrect slot name - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [HACKERS] Create subscription with `create_slot=false` andincorrect slot name
Date
Msg-id 4caa914a-1c15-54be-3572-81fab9670ae8@2ndquadrant.com
Whole thread Raw
In response to Re: [HACKERS] Create subscription with `create_slot=false` andincorrect slot name  (Petr Jelinek <petr.jelinek@2ndquadrant.com>)
Responses [HACKERS] Re: Create subscription with `create_slot=false` and incorrect slotname
List pgsql-hackers
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.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] ALTER SUBSCRIPTION ..SET PUBLICATION refreshis not throwing error.
Next
From: Amit Kapila
Date:
Subject: Re: [HACKERS] Regarding Postgres Dynamic Shared Memory (DSA)