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

From Laurenz Albe
Subject Re: AW: AW: Replication Testing- How to introduce a Lag
Date
Msg-id fc42f77c80fdb3c0267148b807edfacc49b0b0ca.camel@cybertec.at
Whole thread Raw
In response to AW: AW: Replication Testing- How to introduce a Lag  ("Subramanian,Ramachandran" <ramachandran.subramanian@alte-leipziger.de>)
Responses AW: AW: AW: Replication Testing- How to introduce a Lag
List pgsql-novice
On Sat, 2026-03-21 at 07:49 +0000, Subramanian,Ramachandran wrote:
> > Look at "pg_stat_replication" on the primary server.
>
> If I just look at the write_lag columns, it would give me a good idea of the situation --  Is my understanding
correct? 

Yes, but if no WAL gets generated and replicated for a while, the columns will
become NULL, because then delay measured in time makes no sense.

Therefore, I prefer to use "replay_lsn" and friends and measure the lag in bytes.

Yours,
Laurenz Albe



pgsql-novice by date:

Previous
From: "Subramanian,Ramachandran"
Date:
Subject: AW: AW: Replication Testing- How to introduce a Lag
Next
From: Ibrahim Shaame
Date:
Subject: Merging two queries and I get syntax errors