Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 5A6B51337B67 for ; Thu, 14 Oct 2010 19:39:59 -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 60163-05 for ; Thu, 14 Oct 2010 22:39:51 +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 B98591337B5C for ; Thu, 14 Oct 2010 19:39:51 -0300 (ADT) Received: from [192.168.10.2] (ASte-Genev-Bois-153-1-62-214.w81-249.abo.wanadoo.fr [81.249.212.214]) by sd-17937.dedibox.fr (Postfix) with ESMTPA id 5A2593B8F5; Fri, 15 Oct 2010 00:39:51 +0200 (CEST) Message-ID: <4CB786B7.7080700@lelarge.info> Date: Fri, 15 Oct 2010 00:39:51 +0200 From: Guillaume Lelarge User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); fr; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4 MIME-Version: 1.0 To: Rudolf van der Leeden CC: pgsql-admin@postgresql.org Subject: Re: How to find the primary server of a hot standby server? References: <0F09A748-DB17-44B3-BCE0-2FEAA22E8FE5@logicunited.com> In-Reply-To: <0F09A748-DB17-44B3-BCE0-2FEAA22E8FE5@logicunited.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit 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: 201010/125 X-Sequence-Number: 35866 Le 14/10/2010 23:18, Rudolf van der Leeden a écrit : > [...] > quick question to the PG 9 community. > > I can query a hot standby server if recovery is still active using > the administration function pg_is_in_recovery(). Is there also a way > to query for the 'primary server', i.e. which server is delivering > the WAL records? > > I'd like to monitor a bunch of standby servers in terms of > configuration and operation. > There's no "SQL" way to know this, AFAICT. But I would love to be proven wrong: I would be able to add this info to pgAdmin, which would be great. -- Guillaume http://www.postgresql.fr http://dalibo.com