Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W4C2g-0003i0-7c for pgsql-admin@arkaria.postgresql.org; Fri, 17 Jan 2014 16:13:10 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W4C2f-0006Ll-9i for pgsql-admin@arkaria.postgresql.org; Fri, 17 Jan 2014 16:13:09 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W4C2d-0006Lc-6G for pgsql-admin@postgresql.org; Fri, 17 Jan 2014 16:13:07 +0000 Received: from arbun.splivalo.hr ([78.47.9.189]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W4C2V-0002fl-E4 for pgsql-admin@postgresql.org; Fri, 17 Jan 2014 16:13:05 +0000 Received: from [10.50.1.106] (unknown [213.186.6.3]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: mario) by arbun.splivalo.hr (Postfix) with ESMTPSA id 37B9E12004E for ; Fri, 17 Jan 2014 17:12:58 +0100 (CET) Message-ID: <52D95689.7070101@splivalo.hr> Date: Fri, 17 Jan 2014 17:12:57 +0100 From: Mario Splivalo User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: Checking replication slave state X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: 0.5 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org 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