On 02/06/16 15:32, Bertrand Paquet wrote: > Hi, > > On an hot standby streaming server, is there any way to know, in SQL, to > know the ip of current master ? No. > The solution I have is to read the recovery.conf file to find > primary_conninfo, That is currently the only solution. There are plans to allow SQL access to the parameters in recovery.conf (or to merge them into postgresql.conf) but that's not currently possible. > but, it can be false. It would only be wrong if recovery.conf has been edited since the stanby was last restarted. There are hooks for connections and disconnections of the walreceiver, so it should be possible and fairly simple to write an extension that remembers and exposes the primary_conninfo in effect. -- Vik Fearing +33 6 46 75 15 36 http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general