From: | Noah Misch <noah(at)leadboat(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Tatsuo Ishii <ishii(at)postgresql(dot)org>, kondo(at)sraoss(dot)co(dot)jp, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Re: [BUGS] BUG #13611: test_postmaster_connection failed (Windows, listen_addresses = '0.0.0.0' or '::') |
Date: | 2015-10-13 02:08:31 |
Message-ID: | 20151013020831.GC164717@tornado.leadboat.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
On Mon, Oct 12, 2015 at 08:07:37PM -0400, Tom Lane wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> > On Fri, Oct 9, 2015 at 10:16 PM, Noah Misch <noah(at)leadboat(dot)com> wrote:
> >> The listening side is in good shape today. This thread is about the address
> >> that pg_ctl uses in PQping("host=..."). Listening on 0.0.0.0 is portable.
> >> PQping("host='0.0.0.0'") relies on non-portable semantics in the underlying
> >> connect() syscall. PQping("host='127.0.0.1'") is a portable substitute.
>
> > Ah. So in this case 0.0.0.0 is interpreted to mean "any IP that's a
> > way to reach the local host", and using 127.0.0.1 makes sense because
> > we know that will always be one of them? I could buy that line of
> > reasoning.
>
> I do *not* buy that we can safely replace "localhost" by "127.0.0.1".
Nobody proposed that. The word "localhost" did not appear in this thread.
> Consider a system that's only set up with IPv6 local addressing.
>
> AFAICS the complaint in this bug is about a system with broken DNS (ie,
> unable to resolve "localhost" properly, which is something mandated by
> relevant RFCs, I believe).
The original post used only "0.0.0.0" and "::", not "localhost" or anything
else entailing name resolution. As I wrote above, Kondo proposed for pg_ctl
to use PQping("host='127.0.0.1'") in place of PQping("host='0.0.0.0'").
That's all. pg_ctl would continue to use PQping("host='localhost'") where
it's doing so today. A patch that changes the 0.0.0.0 case in this way should
also change PQping("host='::'") to PQping("host='::1'"); I suspect that was
implicit in the original proposal.
nm
From | Date | Subject | |
---|---|---|---|
Next Message | Haribabu Kommi | 2015-10-13 03:04:41 | Re: BUG #13670: DST discrepancy between age() and subtraction for timestamptz arguments |
Previous Message | Andres Freund | 2015-10-13 01:47:29 | Re: BUG #13675: Problem statement “INSERT ON CONFLICT WHERE" |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2015-10-13 02:31:07 | Re: [COMMITTERS] pgsql: Cause TestLib.pm to define $windows_os in all branches. |
Previous Message | Michael Paquier | 2015-10-13 01:26:14 | Re: bugs and bug tracking |