Negative replication lag?

From: Quentin Hartman <qhartman(at)direwolfdigital(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Negative replication lag?
Date: 2013-04-22 22:36:38
Message-ID: CAJ48qNYoX7oGHXhnhLKC-fVWHnOS90vd0AH3AUPqRjXar7UgAg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm using this script to check my replication lag on my streaming
replication pairs with Nagios:

https://gist.github.com/jacobian/743942

It generally works fine, but will occasionally return a negative lag value
(-37kb for example) which of course causes it to throw an alarm, but is
total nonsense. I've been working on the assumption that it is some sort of
bug in the script, but in taking a quick look at it nothing jumps out at me.

Is there something in Postgres itself that could cause this to happen once
in awhile? Is it something to be concerned about? Is there a better way to
monitor this state?

Thanks!

QH

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andres Freund 2013-04-22 23:11:26 Re: Negative replication lag?
Previous Message John R Pierce 2013-04-22 22:29:11 Re: bug in 8.4 and resolved