Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 344CEB62FB7 for ; Fri, 3 Jun 2011 19:10:54 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 77342-10 for ; Fri, 3 Jun 2011 22:10:47 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sd-17937.dedibox.fr (sd-17937.dedibox.fr [88.191.100.74]) by mail.postgresql.org (Postfix) with ESMTP id 1F5EBB630DD for ; Fri, 3 Jun 2011 19:10:47 -0300 (ADT) Received: from [192.168.10.3] (ASte-Genev-Bois-153-1-9-147.w83-112.abo.wanadoo.fr [83.112.71.147]) by sd-17937.dedibox.fr (Postfix) with ESMTPA id CFE613B8F5; Sat, 4 Jun 2011 00:10:45 +0200 (CEST) Subject: Re: Streaming replication status and fail over questions From: Guillaume Lelarge To: Michael Holt Cc: pgsql-admin@postgresql.org Date: Sat, 04 Jun 2011 00:10:45 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.0.1 (3.0.1-1.fc15) Content-Transfer-Encoding: 7bit Message-ID: <1307139045.2026.6.camel@laptop> Mime-Version: 1.0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.419 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FS_REPLICA=3.599, SARE_SPEC_REPLICA=0.72 X-Spam-Level: ** X-Archive-Number: 201106/21 X-Sequence-Number: 37647 On Fri, 2011-06-03 at 11:07 -0700, Michael Holt wrote: > I'm investigating moving from slony to streaming replication as we > plan some upgrades from 8.x versions of postgres to 9. I've managed to > get it working but there's a couple questions I've been unable to find > answers to so far. > > 1) I've seen things about using pg_current_xlog_location(), > pg_last_xlog_replay_location(), pg_last_xlog_receive_location() to > check replication status, but how can this tell me either the time lag > or actual query lag? It can't. > Do I need to wait for 9.1 and it's replication monitoring features? > It will only give you time lag (and some nice views, but no query lag). > 2) If I have a master to multi-slave setup and need to fail over, is > there anyway for slaves to detect the new master? Automatically, no. > Without this it seems like fail over could be pretty messy. > Failover isn't messy. Switchover, in the other hand, is pretty difficult. > 3) Finally just wanted to confirm that SR allows only for replication > of an entire server. > Yes. -- Guillaume http://blog.guillaume.lelarge.info http://www.dalibo.com