Useful shortcuts for vi editor

Showing posts with label patroni. Show all posts
Showing posts with label patroni. Show all posts

Sunday, 1 December 2024

pg_wal folder bloat problem on Standby nodes

Problem/Case
When using typical physical streaming, pg_wal size grows very fast and unexpectedly on DR (Disaster)/Backup/Standby node

Solution
Check inactive replication slots on DR node. If it exists, drop them
SQL> SELECT * FROM pg_replication_slots WHERE active = 'f';

Then run it:
SQL> SELECT pg_drop_replication_slot('inactive-node');

Problem/Case
When using patroni, pg_wal size grows very fast and unexpectedly on DR (Disaster)/Backup/Standby node

Solution
Check patroni maintenance mode by running "patronictl -c /etc/patroni/patroni.yml list"

If it is "pause" mode, then switch to "resume"
$ patronictl -c /etc/patroni/patroni.yml resume