Re: BUG #10140: Configured for 127.0.0.1 but binds to all IP - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #10140: Configured for 127.0.0.1 but binds to all IP
Date
Msg-id 12973.1398452941@sss.pgh.pa.us
Whole thread Raw
In response to BUG #10140: Configured for 127.0.0.1 but binds to all IP  (sofiamay@mail.ru)
Responses Re[2]: [BUGS] BUG #10140: Configured for 127.0.0.1 but binds to all IP  (sdfasdf asdfasdf <sofiamay@mail.ru>)
List pgsql-bugs
sofiamay@mail.ru writes:
> All versions 9.x.x Postgresql have a BUG. Its configured for 127.0.0.1 but
> binds to all IP (0.0.0.0)!

What's your evidence for this statement?

> but in reality:
> postgres.exe    TCP    0.0.0.0    5432                    and
> postgres.exe    TCP    ::    5432

I don't know what tool you're using here, but I wonder if you aren't
misinterpreting its output.  For comparison's sake, when using Linux's
"netstat -l -n", I see this when PG's listen_addresses is '*':

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State
...
tcp        0      0 0.0.0.0:5432                0.0.0.0:*                   LISTEN
...

while when listen_addresses is 'localhost' the line is:

tcp        0      0 127.0.0.1:5432              0.0.0.0:*                   LISTEN

The all-zeroes foreign address does *not* mean that the socket is
accessible from everywhere, it just reflects an absence of data
for that column.  The local address column is what's important
for a listening socket --- at least with netstat.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Stephen Frost
Date:
Subject: Re: pitfalls of installing pgpool on a standby server
Next
From: Tom Lane
Date:
Subject: Re: BUG #10141: Server fails to send query result.