DROP SUBSCRIPTION with no slot

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: DROP SUBSCRIPTION with no slot
Date: 2019-09-24 14:31:02
Message-ID: CAMkU=1zOWyYzNCzNLN9MvqnnrVGXZfTNe1dZ0Gh+6XkT8d8X2Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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 work. So I had to do a silly little dance where I first disable the
subscription, then ALTER SUBSCRIPTION ... SET (slot_name = NONE), then drop
it.

Wanting to clean up after itself is admirable, but if there is nothing to
clean up, why should that be an error condition? Should this be an item on
https://wiki.postgresql.org/wiki/Todo (to whatever extent that is still
used).

Cheers,

Jeff

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2019-09-24 15:13:07 Re: PostgreSQL12 and older versions of OpenSSL
Previous Message Nikolay Shaplov 2019-09-24 13:49:11 Re: [PATCH] src/test/modules/dummy_index -- way to test reloptions from inside of access method