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