PMG cluster with 1 node, pg_wal directory filling disk

Pegasus

Renowned Member
Aug 29, 2013
64
1
73
Las Vegas, USA
Hello.

When I set up PMG, I intended to add a second node so I created a cluster. I haven't been able to add that node yet and won't have time to do so in the near future. I see in other posts manual instructions for removing the cluster but will that automatically adjust the PostgreSQL config to stop preparing for replication? (I'm sure that's why there are so many 16MB files in the pg_wal directory.)

Thank you!
 
the PMG cluster-stack does not use postgresql replication to synchronize the rules, so this should not be the cause for the files in the pg_wal directory.

* How did you come to the conclusion that the PMG cluster stack is the reason?
* Why are the files problematic?
 
the PMG cluster-stack does not use postgresql replication to synchronize the rules, so this should not be the cause for the files in the pg_wal directory.

* How did you come to the conclusion that the PMG cluster stack is the reason?
* Why are the files problematic?
1) I looked up files filling up the pg_wal directory and pending replication is the most common reason, so I assumed PMG used it for the cluster replication.
2) These files are slowly consuming all available disk space. I'm at 81% full as of now and the pg_wal directory is currently 4.1GB, 64% of the used space. PMG is the only thing running on this machine. Is there anything else that could be consuming space?
 
2) These files are slowly consuming all available disk space. I'm at 81% full as of now and the pg_wal directory is currently 4.1GB, 64% of the used space. PMG is the only thing running on this machine. Is there anything else that could be consuming space?
That's odd - and I haven't encountered this until now - the directory on a few test-instances here is < 100M ...
I'd check the postgresql log, and the journal for any potential issues that might explain this.

do you have any modifications in place? - did you adapt the postgresql configuration?
 
PMG does not use PostgreSQL replication for clustering, so the pg_wal growth is likely unrelated to your cluster setup. Large pg_wal directories are often caused by lingering replication slots, failed archiving, or long-running transactions, even on single-node setups. Please check for inactive replication slots using select * from pg_replication_slots and review the PostgreSQL logs for errors about archiving or checkpoints. Are there any unusual errors in your logs, or is there a high volume of mail processing that could generate excessive WAL activity?