Re: AW: Replication Testing- How to introduce a Lag

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: "Subramanian,Ramachandran" <ramachandran(dot)subramanian(at)alte-leipziger(dot)de>, "pgsql-novice(at)lists(dot)postgresql(dot)org" <pgsql-novice(at)lists(dot)postgresql(dot)org>
Subject: Re: AW: Replication Testing- How to introduce a Lag
Date: 2026-03-25 06:04:14
Message-ID: 9960ee435fe72e3058de77bd28894daaff24031a.camel@cybertec.at
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
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

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Subramanian,Ramachandran 2026-03-26 12:09:50 Very basic question about Archive logs
Previous Message Subramanian,Ramachandran 2026-03-24 17:01:07 AW: Replication Testing- How to introduce a Lag