public inbox for pgsql-novice@postgresql.org
help / color / mirror / Atom feedFrom: Laurenz Albe <laurenz.albe@cybertec.at>
To: Subramanian,Ramachandran <ramachandran.subramanian@alte-leipziger.de>
To: pgsql-novice@lists.postgresql.org <pgsql-novice@lists.postgresql.org>
Subject: Re: AW: Replication Testing- How to introduce a Lag
Date: Wed, 25 Mar 2026 07:04:14 +0100
Message-ID: <9960ee435fe72e3058de77bd28894daaff24031a.camel@cybertec.at> (raw)
In-Reply-To: <003a3038c353448cb2b7cf0e1a179f98@alte-leipziger.de>
References: <aadb9058660d4e10b5cee44b82458802@alte-leipziger.de>
<f3927bc3a9baf4400325b91652869907f0581c97.camel@cybertec.at>
<e1e41761323040228570cf6a7e02518e@alte-leipziger.de>
<8b38fa5141905f9ad6983b8d5ae944e812e3d28a.camel@cybertec.at>
<fa47fe18078043adbdfe007b7270ffd0@alte-leipziger.de>
<fc42f77c80fdb3c0267148b807edfacc49b0b0ca.camel@cybertec.at>
<fc3be1f56ded49dc9be519f92d8b9ab4@alte-leipziger.de>
<0e00fcc0062b59b88f98dba4900ce49d5a9a3fea.camel@cybertec.at>
<477369bf897b44feb2d2368f6fca93fc@alte-leipziger.de>
<89d63402747edb3bf80ff668fdd63cc77334f446.camel@cybertec.at>
<aa307627991c41f280bb6da27ebc9b1d@alte-leipziger.de>
<013104103e016e84d59c1e2accb0b1b1f99d9870.camel@cybertec.at>
<39ec6185a893473aa9217520e5a92be7@alte-leipziger.de>
<2fb6a2f5eb2c9a1cbe701a237c74223d121ca918.camel@cybertec.at>
<003a3038c353448cb2b7cf0e1a179f98@alte-leipziger.de>
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
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-novice@postgresql.org
Cc: laurenz.albe@cybertec.at, ramachandran.subramanian@alte-leipziger.de, pgsql-novice@lists.postgresql.org
Subject: Re: AW: Replication Testing- How to introduce a Lag
In-Reply-To: <9960ee435fe72e3058de77bd28894daaff24031a.camel@cybertec.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox