2 Answers
- Newest
- Most votes
- Most comments
0
I'm not sure if it perfectly applies to this case, but I found the following knowledge, so could you check it?
Normally, The most common reasons for increase in the replica lag are the following:
- Configuration differences between the primary and replica instances
- Heavy write workload on the primary instance
- Transactions that are running for a long time
- Exclusive lock on primary instance tables
- Corrupted or missing WAL file
- Network issues
- Incorrect parameter setting
- No transactions
Why do I have replication lags and errors in my RDS for PostgreSQL DB instance?
https://repost.aws/knowledge-center/rds-postgresql-replication-lag
0
Hi,
You may try to get the delay in bytes (not in ms, sorry) from the origin side by using pg_xlog_location_diff
to compare the origin's pg_current_xlog_insert_location
with the replay_location for that backend's pg_stat_replication entry.
Look at this article for more details: https://medium.com/@sajithchandran/monitoring-postgresql-replication-35d70fd86cef
Best,
Didier
Relevant content
- Accepted Answerasked 10 months ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 2 years ago
Thanks, but I have gone through this and before I dig further in, I want to make sure that I am using the correct metric to measure the lag and that's what my question is about.