Forum Discussion

Mike_Aracic's avatar
Mike_Aracic
Icon for Employee rankEmployee
13 years ago
Solved

PostgreSQL replication lag incorrect

Why is my PostgreSQL replication lag consistently off by some large number of seconds?

  • Our PostgreSQL replication datasource, with implementation described here includes some scripts used to extend snmpd. One of them uses date commands with a -u option. This assumes that your databases use UTC. If they do not report the time in UTC, this will cause a consistent error. Depending on the specifics, you may want to remove the -u, or possibly apply an offset in seconds to correct for the discrepancy.

1 Reply

Replies have been turned off for this discussion
  • Our PostgreSQL replication datasource, with implementation described here includes some scripts used to extend snmpd. One of them uses date commands with a -u option. This assumes that your databases use UTC. If they do not report the time in UTC, this will cause a consistent error. Depending on the specifics, you may want to remove the -u, or possibly apply an offset in seconds to correct for the discrepancy.