Checking replication slave state

From: Mario Splivalo <mario(at)splivalo(dot)hr>
To: pgsql-admin(at)postgresql(dot)org
Subject: Checking replication slave state
Date: 2014-01-17 16:12:57
Message-ID: 52D95689.7070101@splivalo.hr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-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

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Steve Crawford 2014-01-17 16:42:39 Re: Checking replication slave state
Previous Message Bernhard Schrader 2014-01-16 13:46:13 clog problems after dump/restore