Re: How can we tell how far behind the standby is? - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: How can we tell how far behind the standby is?
Date
Msg-id AANLkTimLSd2bF8jRLoM2PkkyqChf+u6LK2bvuy_5HCN0@mail.gmail.com
Whole thread Raw
In response to How can we tell how far behind the standby is?  (Josh Berkus <josh@agliodbs.com>)
Responses Re: How can we tell how far behind the standby is?
List pgsql-hackers
On Sat, Nov 6, 2010 at 3:46 AM, Josh Berkus <josh@agliodbs.com> wrote:
> I'm continuing in my efforts now to document how to deploy and manage
> replication on our wiki.  One of the things a DBA needs to do is to use
> pg_current_xlog_location() (and related functions) to check how far
> behind the master the standby is.
>
> However, there's some serious problems with that:
>
> (1) comparing these numbers is quite mathematically complex -- and, for
> that matter, undocumented.
>
> (2) pg_rotate_xlog and/or archive_timeout will create a "gap" in the
> xlog positions, quite a large one if it happens near the beginning of a
> file.  There is no way for any monitoring on the standby to tell the
> difference between a gap created by forced rotation as opposed to being
> most of a file behind, until the next record shows up.  Hello, nagios
> false alerts!
>
> (3) There is no easy way to relate a difference in log positions to an
> amount of time.

The patch which I'm proposing is helpful for you?
http://archives.postgresql.org/pgsql-hackers/2010-11/msg00167.php

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center


pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: timestamp of the last replayed transaction
Next
From: Shigeru HANADA
Date:
Subject: Re: SQL/MED estimated time of arrival?