Replication slots and footguns - Mailing list pgsql-hackers

From Josh Berkus
Subject Replication slots and footguns
Date
Msg-id 5320AEC9.2080508@agliodbs.com
Whole thread Raw
Responses Re: Replication slots and footguns  (Andres Freund <andres@2ndquadrant.com>)
Re: Replication slots and footguns  (Thom Brown <thom@linux.com>)
List pgsql-hackers
All:

I was just reading Michael's explanation of replication slots
(http://michael.otacoo.com/postgresql-2/postgres-9-4-feature-highlight-replication-slots/)
and realized there was something which had completely escaped me in the
pre-commit discussion:

select pg_drop_replication_slot('slot_1');
ERROR:  55006: replication slot "slot_1" is already active
LOCATION:  ReplicationSlotAcquire, slot.c:339

What defines an "active" slot?

It seems like there's no way for a DBA to drop slots from the master if
it's rapidly running out of disk WAL space without doing a restart, and
there's no way to drop the slot for a replica which the DBA knows is
permanently offline but was connected earlier.  Am I missing something?

If I'm not, that seems like something to fix before 9.4 release.

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com



pgsql-hackers by date:

Previous
From: Oleg Bartunov
Date:
Subject: Re: jsonb and nested hstore
Next
From: Andres Freund
Date:
Subject: Re: Replication slots and footguns