瀚高数据库
删除订阅时报错:
highgo=# drop subscription test2_sub ;
ERROR: could not drop replication slot "test2_sub" on publisher: ERROR: replication slot "test2_sub" does not exist
当删除订阅时,DROP SUBSCRIPTION操作将连接到逻辑复制的主库上清理绑定的复制槽,如果相关复制槽未被发现,则执行DROP SUBSCRIPTION命令时将会报错。
这种情况说明该订阅使用到的复制槽已被各种原因删除。
需要解除复制槽与订阅的绑定关系。
highgo=# alter subscription test2_sub set (slot_name =none);
ALTER SUBSCRIPTION
如果订阅状态为enable,需要先disable,然后再解除绑定:
highgo=# alter subscription test2_sub disable;
ALTER SUBSCRIPTION
highgo=# alter subscription test2_sub set (slot_name =none);
ALTER SUBSCRIPTION
否则会报错:
highgo=# alter subscription test2_sub set (slot_name =none);
ERROR: cannot set slot_name = NONE for enabled subscription
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/69994931/viewspace-2939793/
,如需转载,请注明出处,否则将追究法律责任。