Re: BUG #9003: Hard-coding to localhost in postmaster - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #9003: Hard-coding to localhost in postmaster
Date
Msg-id 26252.1390867252@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #9003: Hard-coding to localhost in postmaster  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-bugs
Andres Freund <andres@2ndquadrant.com> writes:
> On 2014-01-27 18:31:25 +0000, pmorie@redhat.com wrote:
>> Currently there is a hard-coding in postgresql postmaster to bind to
>> 'localhost'.  This results in postmaster and autovacuum being broken if the
>> user cannot bind to 127.0.0.1.

> Why would the user be unable to bind to 127.0.0.1? I.e. what's the
> usecase this would allow?

Is there some other preferred name for localhost?  I was under the
impression that that name was required by some dusty RFC or other.

Assuming that you're speaking of the statistics collector's port, we do
not really want that to be "configurable" because there is no possible
reason for allowing it to bind to anything except the current host.
There would be a lot more potential for breakage than positive results
if we exposed a configuration knob for that.

I recall that we did debate relying on "localhost" versus hard-coding
"127.0.0.1", and rejected the latter because IPv6 might be preferred
on some systems.

            regards, tom lane

pgsql-bugs by date:

Previous
From: bricklen
Date:
Subject: Re: BUG #9001: Documentation bug
Next
From: Andres Freund
Date:
Subject: Re: BUG #9003: Hard-coding to localhost in postmaster