Re: Feature Request: pg_replication_master()

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Feature Request: pg_replication_master()
Date: 2012-12-19 06:10:16
Message-ID: CABUevEyPPOZdqw1OYd3SHq9f6PjNT==Nhz-RWW1d-cvjC2ONLg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Dec 19, 2012 4:43 AM, "Josh Berkus" <josh(at)agliodbs(dot)com> wrote:
>
> Hackers,
>
> Currently we can see each master's current replicas using
> pg_stat_replication. However, there is no way from a replica, that I
> know of, to figure out who its master is other than to look at
> recovery.conf.
>
> We should probably have a function, like pg_replication_master(), which
> gives the host address of the current master. This would help DBAs for
> large replication clusters a lot. Obviously, this would only work in
> streaming.

This sounds like my previous suggestion of returning the primary conninfo
value, but with just ip. That one came with a pretty bad patch, and was
later postponed until we folded recovery.conf into the main configuration
file parsing. I'm not really sure what happened to that project? (the
configuration file one)

/Magnus

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2012-12-19 06:34:36 Re: system administration functions with hardcoded superuser checks
Previous Message Jeevan Chalke 2012-12-19 05:30:13 Re: too much pgbench init output