From: Bill MacArthur <webmaster@dhs-club.com>
To: pgsql-admin@postgresql.org
Subject: how to tell if a replication server has stopped replicating
Date: Fri, 26 Aug 2011 12:20:44 -0400
Message-ID: <4E57C7DC.7020508@dhs-club.com> (raw)
Hello,
We recently discovered, quite by accident, that our streaming replication server was no longer replicating. We noticed this in our master server log file:
2011-08-26 00:00:05 PDT postgres 192.168.17.4 [unknown]LOG: replication connection authorized: user=postgres host=192.168.17.4 port=53542
2011-08-26 00:00:05 PDT postgres 192.168.17.4 [unknown]FATAL: requested WAL segment 00000001000001D10000006B has already been removed
As it turned out this has been going on for at least a week as everyday's log files were crammed with these messages. Whatever caused the replication server to end up needing the WAL file is a mystery for another day. What I would like to do is setup a simple method of alerting us if replication stops. We could do a simple grep of log files on the replication side, but I am guessing that there is some SQL command that could be run against the postgres internals that would be cleaner. Is there such an animal?
Thank you,
Bill MacArthur
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: webmaster@dhs-club.com
Subject: Re: how to tell if a replication server has stopped replicating
In-Reply-To: <4E57C7DC.7020508@dhs-club.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox