我正在使用 pgAdmin,无法删除数据库中的订阅或删除数据库。
当我尝试删除数据库时,我收到错误消息
ERROR: database "xxxx" is being used by logical replication subscription DETAIL: There are 4 subscriptions.
Run Code Online (Sandbox Code Playgroud)
当我尝试删除收到的订阅时
ERROR: could not drop the replication slot "xxxx" on publisher DETAIL: The error was: ERROR: replication slot "xxxx" does not exist
Run Code Online (Sandbox Code Playgroud)
查询复制槽时我收到 0 个结果
select * from pg_replication_slots
Run Code Online (Sandbox Code Playgroud)
当我查询订阅时,它们都会出现
SELECT * FROM pg_subscription
Run Code Online (Sandbox Code Playgroud)
非常感谢任何帮助!
不幸的是,你必须经历这个精心设计的舞蹈:
alter subscription <sub1> disable;
alter subscription <sub1> set (slot_name = none);
drop subscription <sub1>;
Run Code Online (Sandbox Code Playgroud)
对于每个订阅,然后才能删除数据库。
我认为这种怪物的理由是他们想让用户很难放弃订阅而不放弃它为发行商提供的服务。您可以做到,只需为每个订阅多走两步即可。
| 归档时间: |
|
| 查看次数: |
3932 次 |
| 最近记录: |