Need Force flag for pg_drop_replication_slot()
От | Josh Berkus |
---|---|
Тема | Need Force flag for pg_drop_replication_slot() |
Дата | |
Msg-id | 55689ECC.9030300@agliodbs.com обсуждение исходный текст |
Ответы |
Re: Need Force flag for pg_drop_replication_slot()
Re: Need Force flag for pg_drop_replication_slot() Re: Need Force flag for pg_drop_replication_slot() |
Список | pgsql-hackers |
Hackers, pg_drop_replication_slot() can be a time-critical function when the master is running out of disk space because the replica is falling behind. So I was a little startled by this: cio=# select pg_drop_replication_slot('bdr_24577_6147720645156311471_1_25383__'); ERROR: replication slot "bdr_24577_6147720645156311471_1_25383__" is already active You have to first terminate the replication connection before you can delete the slot ... and do it fast enough that the replica doesn't reconnect before you drop the slot. While I'm just doing this during testing, it could be a critical fail in production. I think the simplest way to resolve this would be to add a boolean flag to pg_drop_replication_slot(), which would terminate the replication connection and delete the slot as a single operation. -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com
В списке pgsql-hackers по дате отправления: