From: Mario Splivalo <mario@splivalo.hr>
To: pgsql-admin@postgresql.org
Subject: Checking replication slave state
Date: Fri, 17 Jan 2014 17:12:57 +0100
Message-ID: <52D95689.7070101@splivalo.hr> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>
Hello.
What would be the preferred/best way to check replication state of a slave?
When I fire up slave, it can either be in 'can not connect to master'
state, it can be in 'catching up' state, or it can be in 'streaming' state.
I can check what pg_is_in_recovery() function returns, but this will
return true regardless of weather server is catching up, failing to
catch up or is in streaming replication with the master.
Is there a way, other then checking the logs, to verify that?
Mario
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
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: mario@splivalo.hr
Subject: Re: Checking replication slave state
In-Reply-To: <52D95689.7070101@splivalo.hr>
* 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