[check_postgres] negative result from hot_standby_delay action

Filip Rembiałkowski filip.rembialkowski at gmail.com
Sun Dec 16 23:48:31 UTC 2012


Other ideas to minimize this effect:

- make the script always query slave first, and master second (this
way users will get a bit more "pessimistic" metric).
- make querying parallel (probably complex and not so effective)

Filip

On Sun, Dec 16, 2012 at 11:23 PM, Guillaume Lelarge
<guillaume at lelarge.info> wrote:
> On Thu, 2012-11-15 at 19:48 +0100, Filip Rembiałkowski wrote:
>> Hello.
>>
>> hot_standby_delay sometimes returns negative value.
>>
>> I know the reason behind this - quite naturally the delay between querying
>> master ad slave can cause this.
>>
>> I think it makes sense to fix it in check_postgres.pl by something like
>> $result = 0 if $result < 0;
>> All in all, it is logically impossible that slave has processed more WAL
>> segments than master :-)
>>
>
> I guess you're right. If nobody objects, I'll commit a patch doing this
> this week.
>
>
> --
> Guillaume
> http://blog.guillaume.lelarge.info
> http://www.dalibo.com
>


More information about the Check_postgres mailing list