DBA Hub

📋Steps in this guide1/1

Manage replication slots

-- Check existing replication slot details

postgresql configurationintermediate
by PostgreSQL
22 views
1

Manage replication slots

-- Check existing replication slot details -- Create replication slots -- Drop unused replication slots

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
postgres#
SELECT redo_lsn, slot_name,restart_lsn, active,
round((redo_lsn-restart_lsn) / 1024 / 1024 / 1024, 2) AS GB_lag
FROM pg_control_checkpoint(), pg_replication_slots;
postgres#
SELECT pg_create_physical_replication_slot('slot_one');
postgres=#
SELECT pg_drop_replication_slot('slot_one');

Comments (0)

Please to add comments

No comments yet. Be the first to comment!