Re: AW: Replication Testing- How to introduce a Lag - Mailing list pgsql-novice

From Laurenz Albe
Subject Re: AW: Replication Testing- How to introduce a Lag
Date
Msg-id 9960ee435fe72e3058de77bd28894daaff24031a.camel@cybertec.at
Whole thread Raw
In response to AW: Replication Testing- How to introduce a Lag  ("Subramanian,Ramachandran" <ramachandran.subramanian@alte-leipziger.de>)
List 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



pgsql-novice by date:

Previous
From: "Subramanian,Ramachandran"
Date:
Subject: AW: Replication Testing- How to introduce a Lag
Next
From: "Subramanian,Ramachandran"
Date:
Subject: Very basic question about Archive logs