pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Noah Misch <noah@leadboat.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Tatsuo Ishii <ishii@postgresql.org>
Cc: kondo@sraoss.co.jp, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Subject: Re: Re: [BUGS] BUG #13611: test_postmaster_connection failed (Windows, listen_addresses = '0.0.0.0' or '::')
Date: Mon, 12 Oct 2015 22:08:31 -0400
Message-ID: <20151013020831.GC164717@tornado.leadboat.com> (raw)
In-Reply-To: <1815.1444694857@sss.pgh.pa.us>
References: <20150910041518.635.87615@wrigleys.postgresql.org>
	<20150914.131534.102176843624802952.t-ishii@sraoss.co.jp>
	<11077.1442205374@sss.pgh.pa.us>
	<20151009032649.GA62964@tornado.leadboat.com>
	<CA+TgmoYfnf=pQKBa5khLf9RH_SkmMEn2miqmoJ-GTXeHNcVULg@mail.gmail.com>
	<20151010021651.GA85148@tornado.leadboat.com>
	<CA+TgmobJ2ntJ8qU69LdemHhSKtC+8cMOVc5Wncmd1DdXbjLOGw@mail.gmail.com>
	<1815.1444694857@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On Mon, Oct 12, 2015 at 08:07:37PM -0400, Tom Lane wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
> > On Fri, Oct 9, 2015 at 10:16 PM, Noah Misch <noah@leadboat.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


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (26+ messages)  latest in thread

Message-ID: <20151013020831.GC164717@tornado.leadboat.com>
Permalink:  ../20151013020831.GC164717@tornado.leadboat.com/
Also on:    postgresql.org/message-id/20151013020831.GC164717@tornado.leadboat.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: noah@leadboat.com, tgl@sss.pgh.pa.us, robertmhaas@gmail.com, ishii@postgresql.org, pgsql-hackers@postgresql.org
  Subject: Re: [BUGS] BUG #13611: test_postmaster_connection failed (Windows, listen_addresses = '0.0.0.0' or '::')
  In-Reply-To: <20151013020831.GC164717@tornado.leadboat.com>
  References: <20150910041518.635.87615@wrigleys.postgresql.org> <20150914.131534.102176843624802952.t-ishii@sraoss.co.jp> <11077.1442205374@sss.pgh.pa.us> <20151009032649.GA62964@tornado.leadboat.com> <CA+TgmoYfnf=pQKBa5khLf9RH_SkmMEn2miqmoJ-GTXeHNcVULg@mail.gmail.com> <20151010021651.GA85148@tornado.leadboat.com> <CA+TgmobJ2ntJ8qU69LdemHhSKtC+8cMOVc5Wncmd1DdXbjLOGw@mail.gmail.com> <1815.1444694857@sss.pgh.pa.us> <20151013020831.GC164717@tornado.leadboat.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox