Re: DROP SUBSCRIPTION with no slot

2019-09-25 Thread Petr Jelinek
Hi, On 25/09/2019 01:07, Jeff Janes wrote: On Tue, Sep 24, 2019 at 5:25 PM Peter Eisentraut > wrote: On 2019-09-24 16:31, Jeff Janes wrote: > I recently had to cut loose (pg_drop_replication_slot) a logical replica > that couldn't keep

Re: DROP SUBSCRIPTION with no slot

2019-09-25 Thread Isaac Morland
On Wed, 25 Sep 2019 at 13:55, Žiga Kranjec wrote: > > Ah. I missed that bit in the documentation! > > Perhaps a publication should remember, whether it actually created a > replication slot and only try to remove it, if it did. Although that > probably wouldn't help much in your case. > What abo

Re: DROP SUBSCRIPTION with no slot

2019-09-25 Thread Žiga Kranjec
> On 25 Sep 2019, at 01:22, Jeff Janes wrote: > > There is no HINT in the error message itself, but there is in the > documentation, see note at end of > https://www.postgresql.org/docs/current/sql-dropsubscription.html > . I

Re: DROP SUBSCRIPTION with no slot

2019-09-24 Thread Jeff Janes
On Tue, Sep 24, 2019 at 6:42 PM Ziga wrote: > This also seems to be a problem for somewhat fringe case of subscriptions > created with connect=false option. > They cannot be dropped in an obvious way, without knowing the ALTER > SUBSCRIPTION trick. > > For example: > > contrib_regression=# create

Re: DROP SUBSCRIPTION with no slot

2019-09-24 Thread Jeff Janes
On Tue, Sep 24, 2019 at 5:25 PM Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > On 2019-09-24 16:31, Jeff Janes wrote: > > I recently had to cut loose (pg_drop_replication_slot) a logical replica > > that couldn't keep up and so was threatening to bring down the master. > > > > In mo

Re: DROP SUBSCRIPTION with no slot

2019-09-24 Thread Ziga
This also seems to be a problem for somewhat fringe case of subscriptions created with connect=false option. They cannot be dropped in an obvious way, without knowing the ALTER SUBSCRIPTION trick. For example: contrib_regression=# create subscription test_sub connection 'dbname=contrib_regress

Re: DROP SUBSCRIPTION with no slot

2019-09-24 Thread Peter Eisentraut
On 2019-09-24 16:31, Jeff Janes wrote: > I recently had to cut loose (pg_drop_replication_slot) a logical replica > that couldn't keep up and so was threatening to bring down the master. > > In mopping up on the replica side, I couldn't just drop the > subscription, because it couldn't drop the no

DROP SUBSCRIPTION with no slot

2019-09-24 Thread Jeff Janes
I recently had to cut loose (pg_drop_replication_slot) a logical replica that couldn't keep up and so was threatening to bring down the master. In mopping up on the replica side, I couldn't just drop the subscription, because it couldn't drop the nonexistent slot on the master and so refused to wo