public inbox for pgsql-novice@postgresql.org  
help / color / mirror / Atom feed
From: Subramanian,Ramachandran <ramachandran.subramanian@alte-leipziger.de>
To: Laurenz Albe <laurenz.albe@cybertec.at>
To: pgsql-novice@lists.postgresql.org <pgsql-novice@lists.postgresql.org>
Subject: AW: AW: AW: AW: Replication Testing- How to introduce a Lag
Date: Mon, 23 Mar 2026 16:36:22 +0000
Message-ID: <477369bf897b44feb2d2368f6fca93fc@alte-leipziger.de> (raw)
In-Reply-To: <0e00fcc0062b59b88f98dba4900ce49d5a9a3fea.camel@cybertec.at>
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>



No; you want to measure the lag between the primary's current WAL position and what was already replayed on the standby:

  SELECT pg_wal_lsn_diff(pg_current_wal_lsn(), replay_lsn)
  FROM pg_stat_replication;

[Subramanian,Ramachandran IT-md-db] 

Thank you yet again for your guidance...  

I noticed that  RBAs are not incremented one for one . i.e  1 row inserted does not mean RBA=RBA+1 . 1 row updated  does not mean RBA=RBA+1 

I have ALTER SYSTEM SET recovery_min_apply_delay=300000 ; ( on the stand by side ) 

On the Source side 
A simple create table results in a RBA difference of 108328 

A simple insert of 1 row results in a RBA difference of 296   sometimes 96 

Is there a way to estimate roughly the amount of data that remains to be transfered ?  


LG

Ram 


Freundliche Grüße

i. A. Ramachandran Subramanian
Zentralbereich Informationstechnologie

Alte Leipziger Lebensversicherung a.G.


Hallesche Krankenversicherung a.G.





Alte Leipziger Lebensversicherung a.G., Alte Leipziger-Platz 1, 61440 Oberursel
Vors. des Aufsichtsrats: Dr. Walter Botermann · Vorstand: Christoph Bohn (Vors.), Dr. Jürgen Bierbaum (stv. Vors.), Frank Kettnaker, Dr. Jochen Kriegmeier, Alexander Mayer, Christian Pape, Wiltrud Pekarek, Udo Wilcsek
Sitz Oberursel (Taunus) · Rechtsform VVaG · Amtsgericht Bad Homburg v. d. H. HRB 1583 · USt.-IdNr. DE 114106814





 
Hallesche Krankenversicherung a.G.,  Löffelstraße 34-38, 70597 Stuttgart
Vors. des Aufsichtsrats: Dr. Walter Botermann · Vorstand: Christoph Bohn (Vors.), Dr. Jürgen Bierbaum (stv. Vors.), Frank Kettnaker, Dr. Jochen Kriegmeier, Alexander Mayer, Christian Pape,
Wiltrud Pekarek, Udo Wilcsek
Sitz Stuttgart · Rechtsform VVaG · Amtsgericht Stuttgart HRB 2686 · USt.-IdNr. DE 147802285
Beiträge zu privaten Kranken- und Pflegekrankenversicherungen unterliegen nicht der Versicherungsteuer (§ 4 Nr. 5 VersStG) · Versicherungsleistungen sowie Umsätze aus Versicherungsvertreter-/Maklertätigkeiten sind umsatzsteuerfrei
 



 
Die Pflichtangaben der ALH Gruppe gemäß § 35a GmbHG bzw. § 80 AktG finden Sie hier: https://www.alte-leipziger.de/impressum 





______________________

ALH Gruppe
Alte Leipziger-Platz 1, 61440 Oberursel
Tel.: +49 (6171) 66-4882
Fax: +49 (6171) 66-800-4882
E-Mail: ramachandran.subramanian@alte-leipziger.de
www.alte-leipziger.de
www.hallesche.de



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: ramachandran.subramanian@alte-leipziger.de, laurenz.albe@cybertec.at, pgsql-novice@lists.postgresql.org
  Subject: Re: AW: AW: AW: AW: Replication Testing- How to introduce a Lag
  In-Reply-To: <477369bf897b44feb2d2368f6fca93fc@alte-leipziger.de>

* 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