Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 50B30B5DBF8 for ; Sun, 21 Aug 2011 16:43:36 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 42441-01-2 for ; Sun, 21 Aug 2011 19:43:29 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from acidenitrix.villemain.org (acidenitrix.villemain.org [91.121.90.165]) by mail.postgresql.org (Postfix) with ESMTP id C2B6BB5DD6D for ; Sun, 21 Aug 2011 16:38:36 -0300 (ADT) Received: from [89.157.192.174] (helo=DimIMac.local) by acidenitrix.villemain.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1QvDqq-00065K-4U; Sun, 21 Aug 2011 21:38:32 +0200 Received: by DimIMac.local (Postfix, from userid 501) id 85E17271BB85; Sun, 21 Aug 2011 21:38:26 +0200 (CEST) From: Dimitri Fontaine To: A J Cc: PG Admin Subject: Re: Validate standby against master Organization: 2ndQuadrant References: <1313703712.75602.YahooMailNeo@web120004.mail.ne1.yahoo.com> User-Mail-Address: dimitri@2ndQuadrant.fr Date: Sun, 21 Aug 2011 21:38:26 +0200 In-Reply-To: <1313703712.75602.YahooMailNeo@web120004.mail.ne1.yahoo.com> (A. J.'s message of "Thu, 18 Aug 2011 14:41:52 -0700 (PDT)") Message-ID: User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201108/191 X-Sequence-Number: 38178 A J writes: > What are the various ways in which I can validate that a standby (new or > existing) is caught-up with the master ? For streaming replication setup in > v9.x You could use repmgr to monitor your standby: http://repmgr.org/ https://github.com/greg2ndQuadrant/repmgr postgres@node2 $ psql -x -d pgbench -c "SELECT * FROM repmgr_test.repl_status" -[ RECORD 1 ]-------------+------------------------------ primary_node | 1 standby_node | 2 last_monitor_time | 2011-02-23 08:19:39.791974-05 last_wal_primary_location | 0/1902D5E0 last_wal_standby_location | 0/1902D5E0 replication_lag | 0 bytes apply_lag | 0 bytes time_lag | 00:26:13.30293 Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support