↑↓ select↵ open⌫ change scopeOpen full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Wiki / Statistics & Metrics

pg_stat_replication.write_lag

Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written it (but not yet flushed it or applied it). This can be used to gauge the delay that synchronous_commit level remote_write incurred while committing if this server was configured as a synchronous standby.

Reading PG 18·Select a recorded version

View
pg_stat_replication
Field
write_lag
SQL type
interval
Units named in the field definition
Not specified
Reset observation
No stats_reset field is documented for this view
documented
true
field
write_lag
manual path
/docs/18/monitoring-stats.html
signature
SELECT write_lag FROM pg_catalog.pg_stat_replication;
source only
false
sql type
interval
units mentioned
Unknown
view
pg_stat_replication

Definition PG 18

Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written it (but not yet flushed it or applied it). This can be used to gauge the delay that synchronous_commit level remote_write incurred while committing if this server was configured as a synchronous standby.

Compare versions

Source references

Full definition and evidence JSON

Definition sources

center · PostgreSQL 18 · 555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f

Text language: en · 555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f