Re: BUG #9003: Hard-coding to localhost in postmaster

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: pmorie(at)redhat(dot)com, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #9003: Hard-coding to localhost in postmaster
Date: 2014-01-28 00:00:52
Message-ID: 26252.1390867252@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Andres Freund <andres(at)2ndquadrant(dot)com> writes:
> On 2014-01-27 18:31:25 +0000, pmorie(at)redhat(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Paul Morie 2014-01-28 00:06:21 Re: BUG #9003: Hard-coding to localhost in postmaster
Previous Message bricklen 2014-01-27 23:25:22 Re: BUG #9001: Documentation bug