From: | Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> |
---|---|
To: | michael(at)paquier(dot)xyz |
Cc: | peter(dot)eisentraut(at)2ndquadrant(dot)com, kommi(dot)haribabu(at)gmail(dot)com, pgsql-hackers(at)postgresql(dot)org, michael(dot)paquier(at)gmail(dot)com, robertmhaas(at)gmail(dot)com |
Subject: | Re: PQHost() undefined behavior if connecting string contains both host and hostaddr types |
Date: | 2018-03-16 00:52:17 |
Message-ID: | 20180316.095217.07898834.horiguchi.kyotaro@lab.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I drifted to come here..
At Wed, 14 Mar 2018 11:17:35 +0900, Michael Paquier <michael(at)paquier(dot)xyz> wrote in <20180314021735(dot)GI1150(at)paquier(dot)xyz>
> On Fri, Mar 09, 2018 at 04:42:30PM -0500, Peter Eisentraut wrote:
> > It seems, however, that PGhost() has always been broken for hostaddr
> > use. In 9.6 (before the multiple-hosts stuff was introduced), when
> > connecting to "hostaddr=127.0.0.1", PGhost() returns "/tmp". Urgh.
> >
> > I think we should decide what PGhost() is supposed to mean when hostaddr
> > is in use, and then make a fix for that consistently across all versions.
>
> Hm. The only inconsistency I can see here is when "host" is not defined
> but "hostaddr" is, so why not make PQhost return the value of "hostaddr"
> in this case?
https://www.postgresql.org/message-id/19297.1493660213%40sss.pgh.pa.us
> And I believe we already considered and rejected the idea of having it
> return the hostaddr string, back in some of the older discussions.
> (We could revisit that decision, no doubt, but let's go back and see
> what the reasoning was first.)
But I haven't found where the decision made. I seems to be
related to commits commits 11003eb55 and 40cb21f70 or in older
discussion. I'm going to search for that for a while.
regards,
--
Kyotaro Horiguchi
NTT Open Source Software Center
From | Date | Subject | |
---|---|---|---|
Next Message | Masahiko Sawada | 2018-03-16 00:54:56 | Re: User defined data types in Logical Replication |
Previous Message | Peter Eisentraut | 2018-03-16 00:51:25 | Re: handling of heap rewrites in logical decoding |