Re: AW: Replication Testing- How to introduce a Lag
Laurenz Albe <laurenz.albe@cybertec.at>
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: "Subramanian,Ramachandran" <ramachandran.subramanian@alte-leipziger.de>,
"pgsql-novice@lists.postgresql.org" <pgsql-novice@lists.postgresql.org>
Date: 2026-03-25T06:04:14Z
Lists: pgsql-novice
On Tue, 2026-03-24 at 17:01 +0000, Subramanian,Ramachandran wrote: > My question is , can the difference in LSN from this query approximated > to the amount of data that is yet to be transferred > > select pg_wal_lsn_diff(pg_current_wal_lsn(),replay_lsn) from pg_stat_replication That query measures the replication lag in bytes, that *is* the amount of data. Problem solved! Yours, Laurenz Albe