Feature Request: pg_replication_master() - Mailing list pgsql-hackers

From Josh Berkus
Subject Feature Request: pg_replication_master()
Date
Msg-id 50D137CD.1080603@agliodbs.com
Whole thread Raw
Responses Re: Feature Request: pg_replication_master()  (Magnus Hagander <magnus@hagander.net>)
Re: Feature Request: pg_replication_master()  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
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.

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com



pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Cascading replication: should we detect/prevent cycles?
Next
From: Tom Lane
Date:
Subject: Re: Makefiles don't seem to remember to rebuild everything anymore