How Do I Manually Delete Replication Slots from a GaussDB Data Source?
Symptom
The replication slots of the GaussDB data source cannot be automatically deleted. When the number of replication slots reaches the upper limit, you must manually delete them. If a job is no longer needed, you must also delete replication slots to prevent redundant logs.
Possible Cause
The replication slots of the GaussDB data source cannot be automatically deleted.
Solution
- Determine the replication slot to delete. The replication slot name is in migration_Job ID format. You can obtain the job ID on the real-time migration job monitoring page.
- Method 1: Figure 1 Viewing the job ID

- Method 2: Figure 2 Viewing the job ID

- Method 1:
- Log in to the source database used by the job.
- Query the name of the streaming replication slot corresponding to the database object selected for the synchronization task.
select slot_name from pg_replication_slots where database = 'database';
- Run the following statement to delete the corresponding streaming replication slot:
select * from pg_drop_replication_slot('slot_name'); - Run the following statement to check whether the streaming replication slot is deleted:
select slot_name from pg_replication_slots where slot_name = 'slot_name';
- For GaussDB Distributed, perform the operation on each shard. First, check the name of each shard.
SELECT distinct node_name FROM pgxc_node
- Run the SQL statement on specified shards.
EXECUTE DIRECT ON(dn_6001_6002) 'select pg_drop_replication_slot(''slot_name'')'; EXECUTE DIRECT ON(dn_6003_6004) 'select pg_drop_replication_slot(''slot_name'')';
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot

