4 ms·
Lag is one little detail that I find lacking in Streaming Replication. If there was no transaction in the last n seconds, it's going to tell you that lag is n s
by forinti 2y ago
Lag is one little detail that I find lacking in Streaming Replication. If there was no transaction in the last n seconds, it's going to tell you that lag is n s.
Oracle's Dataguard will tell there's no lag, because the databases are the same.
In a development database, lag can get quite high, but it makes no sense to set off an alarm if lag gets too high because it might just be that there was nothing going on.
But the simplicity and reliability of Postgresql I much prefer over Oracle, any day of the week.
- WJW 2y agoIf it's really a problem, you can always use the pt-heartbeat tool from the percona toolkit: https://docs.percona.com/percona-toolkit/pt-heartbeat.html https://docs.percona.com/percona-toolkit/pt-heartbeat.html Conceptually it is very straightforward: It just updates the only row in a special table to the current time every --interval seconds on the main database, then monitors the value in any followers to see which value they have. Subtract the two timestamps to get replication lag.
- forinti 2y agoI'll check it out. Thanks.