Technologies/PostgreSQL/postgresql.wal_size
PostgreSQLPostgreSQLMetric

postgresql.wal_size

WAL file size
Dimensions:None
Available on:DatadogDatadog (2)Native (1)PrometheusPrometheus (1)
Interface Metrics (4)
DatadogDatadog
The sum of all WAL files on disk.
Dimensions:None
DatadogDatadog
Total amount of WAL generated in bytes.
Dimensions:None
Native
Total amount of WAL generated in bytes
Dimensions:None
PrometheusPrometheus
Total size of WAL segments
Dimensions:None

Technical Annotations (19)

Configuration Parameters (5)
max_wal_sizerecommended: 4GB (OLTP) or 16GB (OLAP)
maximum WAL size before forced checkpoint
min_wal_sizerecommended: 1GB (OLTP) or 4GB (OLAP)
minimum WAL to maintain
checkpoint_warningrecommended: 30s
log warning if checkpoints occur more frequently
checkpoint_timeout
Maximum time between automatic WAL checkpoints
checkpoint_completion_target
Fraction of checkpoint interval to spread checkpoint I/O
CLI Commands (4)
SELECT * FROM pg_replication_slots;diagnostic
SELECT pg_drop_replication_slot(slot_name);remediation
du -sh /var/lib/postgresql/*/pg_waldiagnostic
SELECT * FROM pg_stat_bgwriter;diagnostic
Technical References (10)
catalog_xminconceptWAL (Write-Ahead Log)componentreplication slotcomponentpg_walfile pathWrite-Ahead Logging (WAL)componentWALcomponentcheckpointconceptpg_stat_bgwritercomponentlogical replication slotcomponentDDL mismatchconcept
Related Insights (5)
Inactive replication slots prevent autovacuum from removing dead tuples cluster-widecritical
WAL directory bloats to terabytes when replication consumers never reconnectcritical
Undersized max_wal_size triggers frequent checkpoints and I/O spikeswarning
Logical replication slot retained 180 GB of WAL causing disk pressurecritical
Checkpoint and WAL configuration mismatches cause I/O spikeswarning