Skip site navigation (1) Skip section navigation (2)

Re: pg_primary_conninfo

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_primary_conninfo
Date: 2010-12-28 13:39:37
Message-ID: AANLkTiku+F8wdA_s_fmCcb8LR1SubOQHYHhXLY8fdenz@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Tue, Dec 28, 2010 at 14:38, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Tue, Dec 28, 2010 at 8:31 AM, Magnus Hagander <magnus(at)hagander(dot)net> wrote:
>> Attached patch implements a function called pg_primary_conninfo() that
>> returns, well, the primary_conninfo used on the standby when in
>> streaming replication mode (otherwise NULL).
>
> +1.  Let's make sure to explicitly document what this function returns
> when recovery was previous in progress, but we are now in normal
> running.

Oh, didn't think of that scenario.

Is that intended behaviour though? I tend to think that it is (since
you can check with pg_is_in_recovery) as long as it's documented, but
might it make more sense to have it return NULL in this case?

-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

In response to

pgsql-hackers by date

Next:From: tvDate: 2010-12-28 13:41:24
Subject: Re: estimating # of distinct values
Previous:From: Robert HaasDate: 2010-12-28 13:39:20
Subject: Re: Function for dealing with xlog data

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group