Re: pg_standby observation

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, Josh Tolley <eggyknap(at)gmail(dot)com>
Subject: Re: pg_standby observation
Date: 2007-09-16 08:25:34
Message-ID: 1189931134.4212.29.camel@ebony.site
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 2007-09-13 at 11:38 -0700, Jeff Davis wrote:
> I think it would be useful if pg_standby (in version 8.3 contrib) could
> be observed in some way.
>
> Right now I use my own standby script, because every time it runs, it
> touches a file in a known location. That allows me to monitor that file,
> and if it is too stale, I know something must have gone wrong (I have an
> archive_timeout set), and I can send an SNMP trap.
>
> Would it be useful to add something similar to pg_standby? Is there a
> better way to detect a problem with a standby system, or a more
> appropriate place?
>
> The postgres logs do report this also, but it requires more care to
> properly intercept the "restored log file ... from archive" messages.

Well, the definition of it working correctly is that a "restored log
file..." message occurs. Even with archive_timeout set there could be
various delays before that happens. We have two servers and a network
involved, so the time might spike occasionally.

Touching a file doesn't really prove its working either.

Not sure what to suggest otherwise.

--
Simon Riggs
2ndQuadrant http://www.2ndQuadrant.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Panagiwths Pediadiths 2007-09-16 10:46:44 Re: Locking entire database
Previous Message Simon Riggs 2007-09-16 08:15:22 Re: pg_standby observation