From scott@journyx.com Thu Jan 17 16:20:29 2013 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TvsCb-0001ci-Bp for pgsql-admin@arkaria.postgresql.org; Thu, 17 Jan 2013 16:20:29 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TvsCa-0004sS-So for pgsql-admin@arkaria.postgresql.org; Thu, 17 Jan 2013 16:20:28 +0000 Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TvsCa-0004sL-3f for pgsql-admin@postgresql.org; Thu, 17 Jan 2013 16:20:28 +0000 Received: from mail.journyx.com ([209.163.206.41] helo=mail.int.journyx.com) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TvsCV-00031e-3u for pgsql-admin@postgresql.org; Thu, 17 Jan 2013 16:20:24 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.int.journyx.com (Postfix) with ESMTP id 81C32C46D7 for ; Thu, 17 Jan 2013 10:20:22 -0600 (CST) X-Virus-Scanned: amavisd-new at zimbra.int.journyx.com Received: from mail.int.journyx.com ([127.0.0.1]) by localhost (mail.int.journyx.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id J9pyP2W9Qk-E for ; Thu, 17 Jan 2013 10:20:17 -0600 (CST) Received: from mail.int.journyx.com (zimbra.int.journyx.com [192.168.100.5]) by mail.int.journyx.com (Postfix) with ESMTP id 3DAEAC46D9 for ; Thu, 17 Jan 2013 10:20:17 -0600 (CST) Date: Thu, 17 Jan 2013 10:20:17 -0600 (CST) From: Scott Whitney Reply-To: Scott Whitney To: pgsql-admin@postgresql.org Message-ID: <18871234.487716.1358439617072.JavaMail.root@mail.int.journyx.com> In-Reply-To: <25940786.487525.1358439150642.JavaMail.root@mail.int.journyx.com> Subject: Replication monitoring questions MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_487715_11424842.1358439617070" X-Originating-IP: [192.168.100.188] X-Mailer: Zimbra 7.2.0_GA_2669 (ZimbraWebClient - FF3.0 (Win)/7.2.0_GA_2669) X-Pg-Spam-Score: -0.0 (/) 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 ------=_Part_487715_11424842.1358439617070 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit I've got replication setup (streaming replication) between two 9.2.2 clusters. Everything went just fine on that, and it's working as expected. Now, obviously, I'll know if my primary goes down. I just monitor him as usual. How do I tell whether the standby has gone out of sync for whatever reason? Obviously, I can monitor this: ps -elf | grep "wal receiver" but is there a situation in which the wal receiver is running, but the replication is not working, or there are errors? I know about the replay/receive xlog locations, but those can be off due to lag, of course. What I want to know is whether there's a situation in which my standby is running, the receiver process is running, but "something" is wrong. Sorry this isn't more definite. I'm not quite sure what I'm looking for. Thanks, Scott ------=_Part_487715_11424842.1358439617070 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable <= div style=3D'font-family: times new roman,new york,times,serif; font-size: = 12pt; color: #000000'>I've got replication setup (streaming replication) be= tween two 9.2.2 clusters. Everything went just fine on that, and it's worki= ng as expected.

Now, obviously, I'll know if my primary goes down. I= just monitor him as usual.

How do I tell whether the standby has go= ne out of sync for whatever reason?

Obviously, I can monitor this:
ps -elf | grep "wal receiver"

but is there a situation in whic= h the wal receiver is running, but the replication is not working, or there= are errors? I know about the replay/receive xlog locations, but those can = be off due to lag, of course.

What I want to know is whether there's= a situation in which my standby is running, the receiver process is runnin= g, but "something" is wrong.

Sorry this isn't more definite. I'm not= quite sure what I'm looking for.

Thanks,
Scott
<= /html> ------=_Part_487715_11424842.1358439617070-- From stellr@vt.edu Thu Jan 17 17:35:14 2013 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TvtMw-0004SP-1z for pgsql-admin@arkaria.postgresql.org; Thu, 17 Jan 2013 17:35:14 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TvtMu-0002Jz-W9 for pgsql-admin@arkaria.postgresql.org; Thu, 17 Jan 2013 17:35:13 +0000 Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TvtMu-0002JG-0N for pgsql-admin@postgresql.org; Thu, 17 Jan 2013 17:35:12 +0000 Received: from lennier.cc.vt.edu ([198.82.162.213]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TvtMr-00044G-LF for pgsql-admin@postgresql.org; Thu, 17 Jan 2013 17:35:10 +0000 Received: from steiner.cc.vt.edu (steiner.cc.vt.edu [198.82.163.51]) by lennier.cc.vt.edu (8.13.8/8.13.8) with ESMTP id r0HHZ8Fx031574 for ; Thu, 17 Jan 2013 12:35:08 -0500 Received: from mail-qc0-f198.google.com (EHLO mail-qc0-f198.google.com) ([209.85.216.198]) by steiner.cc.vt.edu (MOS 4.3.3-GA FastPath queued) with ESMTP id VKT56024; Thu, 17 Jan 2013 12:35:08 -0500 (EST) Received: by mail-qc0-f198.google.com with SMTP id l35so4221162qco.5 for ; Thu, 17 Jan 2013 09:35:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-received:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to:x-mailer :x-gm-message-state; bh=NOCcm5al4X7VWEH7HvrlmT/kfkgElVTTTtiIYajMP84=; b=GCJj/ZHBmhQ84ctmSazDyiE2lmZ/vq3BrYIDaS3c1wC3o/mTg+QZeSAiWD106T0dYu Insm+r9p06/vEi+WXXb+/1bIKAjUYT2FX74hK9JVyzeNLWX/svsVOK49lK8NJptptRWU zXMFEnq0UDkPaSzNJBk/lYyrWZmgWj/vBgma/SgmbblNVkdba8kn0UUN8mAprHkWr7eb QuU+jzGIyNLB/QhJ4JUxz7LclVm2kof7Ve/wpC+WXjk5RuQbgtB0TBFPtGjfzhqNTlr2 WofASzr/Ol0SWvS3/NntZEgTPAaM+qxk7wRwGCAhyR36FrChr9sYU1xff/xljslgYyyO eL/w== X-Received: by 10.49.62.39 with SMTP id v7mr7101447qer.15.1358444105242; Thu, 17 Jan 2013 09:35:05 -0800 (PST) X-Received: by 10.49.62.39 with SMTP id v7mr7101443qer.15.1358444105165; Thu, 17 Jan 2013 09:35:05 -0800 (PST) Received: from ?IPv6:2001:468:c80:2102:ca2a:14ff:fe2d:2efb? ([2001:468:c80:2102:ca2a:14ff:fe2d:2efb]) by mx.google.com with ESMTPS id t2sm1418008qav.1.2013.01.17.09.35.04 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 17 Jan 2013 09:35:04 -0800 (PST) Subject: Re: Replication monitoring questions Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: multipart/alternative; boundary=Apple-Mail-11-32297653 From: Ray Stell In-Reply-To: <18871234.487716.1358439617072.JavaMail.root@mail.int.journyx.com> Date: Thu, 17 Jan 2013 12:35:03 -0500 Cc: pgsql-admin@postgresql.org Message-Id: <2D781053-27E4-4795-9E26-3C731B079A42@vt.edu> References: <18871234.487716.1358439617072.JavaMail.root@mail.int.journyx.com> To: Scott Whitney X-Mailer: Apple Mail (2.1085) X-Gm-Message-State: ALoCoQkPc0v0ONlTVKY5n3mb0UYY0QK0TaSXq1cqFZV8MesRrYbR5k+313ZhABFsVrTLcDGeWhhGscNG+tF260w5Hh/VcrOho4s5U5mDwNx/pZmzhmPPvzHM5bnhVRerF2zRL5KdP8ZzSS1XhfMa0ohV+ODPNV/jBwGzWO9/hyaTyQPDY3fmmsQ= X-Mirapoint-Received-SPF: 209.85.216.198 mail-qc0-f198.google.com stellr@vt.edu 4 softfail X-Junkmail-Status: score=10/50, host=steiner.cc.vt.edu X-Junkmail-Signature-Raw: score=unknown, refid=str=0001.0A02020A.50F8364C.00EE,ss=1,re=0.000,fgs=0, ip=0.0.0.0, so=2011-07-25 19:15:43, dmn=2011-05-27 18:58:46, mode=single engine X-Junkmail-IWF: false X-Pg-Spam-Score: -1.6 (-) 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 --Apple-Mail-11-32297653 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On Jan 17, 2013, at 11:20 AM, Scott Whitney wrote: > What I want to know is whether there's a situation in which my standby = is running, the receiver process is running, but "something" is wrong. I compare pg_controldata output from the two clusters periodically.= --Apple-Mail-11-32297653 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii
On Jan 17, 2013, at 11:20 AM, Scott = Whitney wrote:
What I want to know is whether there's a = situation in which my standby is running, the receiver process is = running, but "something" is = wrong.

I = compare pg_controldata output from the two clusters = periodically.
= --Apple-Mail-11-32297653--