Technologies/PostgreSQL/postgresql.wal.bytes
PostgreSQLPostgreSQLMetric

postgresql.wal.bytes

WAL bytes generated
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 (3)

Configuration Parameters (1)
dataDiskSizeGb
CLI Commands (2)
gcloud sql instances patch REPLICA_INSTANCE --storage-size=3334GBScale disk to achieve required IOPS quota (example: 10K IOPS ÷ 3 = 3334GB minimum)
SELECT pg_wal_lsn_diff(pg_current_wal_lsn(), replay_lsn) AS lag_bytes, replay_lag FROM pg_stat_replication;Monitor replication lag in bytes and time from primary's perspective
Related Insights (1)
Cloud SQL IOPS throttling causes PostgreSQL replica lag despite healthy WAL generationwarning

Cloud SQL enforces IOPS limits based on disk size (3 IOPS per GB provisioned, max 60K IOPS). PostgreSQL primary generates WAL at line rate but Cloud SQL throttles disk I/O on replicas when applying WAL, causing replication lag. PostgreSQL metrics show healthy WAL generation and no bottlenecks, while Cloud SQL metrics show disk I/O at quota limit.