PostgreSQL pg_wal Growing Too Large: How to Check Replication and Safely Clean Up WAL Files
Is your PostgreSQL pg_wal directory consuming unexpectedly large amounts of disk space while your standby server contains only recent WAL files? This guide explains how to verify streaming replication, identify what is retaining WAL, troubleshoot replication slots and WAL archiving, and safely allow PostgreSQL to reclaim disk space without manually deleting critical WAL files.

