Replication lag bytes postgres

Measure replica lag in bytes plus write/flush/replay lag intervals

SELECT client_addr, state, pg_wal_lsn_diff(pg_current_wal_lsn(), replay_lsn) AS replay_lag_bytes, write_lag, flush_lag, replay_lag FROM pg_stat_replication;
more postgres all 29 commands →