【发布时间】:2015-08-31 12:38:29
【问题描述】:
我有想要删除的复制槽,但是当我删除时,我收到了一个无法从视图中删除的错误。有什么想法吗?
postgres=# SELECT * FROM pg_replication_slots ;
slot_name | plugin | slot_type | datoid | database | active | xmin | catalog_xmin | restart_lsn
--------------+--------------+-----------+--------+----------+--------+------+--------------+-------------
bottledwater | bottledwater | logical | 12141 | postgres | t | | 374036 | E/FE8D9010
(1 row)
postgres=# delete from pg_replication_slots;
ERROR: cannot delete from view "pg_replication_slots"
DETAIL: Views that do not select from a single table or view are not automatically updatable.
HINT: To enable deleting from the view, provide an INSTEAD OF DELETE trigger or an unconditional ON DELETE DO INSTEAD rule.
postgres=#
【问题讨论】:
-
我找到了命令 pg_drop_replication_slot(slot_name name) postgresql.org/docs/9.4/static/… 但是当我做 postgres=# select * from pg_drop_replication_slot('bottledwater');我得到了错误:复制槽“瓶装水”已经处于活动状态
标签: postgresql replication postgresql-9.4