pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #7677: listen_address 'localhost' listens not to IPv6 ::1
2+ messages / 2 participants
[nested] [flat]

* BUG #7677: listen_address 'localhost' listens not to IPv6 ::1
@ 2012-11-19 13:26  bugs@ttyhoney.com
  0 siblings, 1 reply; 2+ messages in thread

From: bugs@ttyhoney.com @ 2012-11-19 13:26 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      7677
Logged by:          Peter Weber
Email address:      bugs@ttyhoney.com
PostgreSQL version: 9.1.6
Operating system:   GNU/Linux (Fedora 17)
Description:        

Hello!
I just started to use PostgreSQL here, and followed this guide[see 1]. As I
am currently just playing around I wondered, if I can use IPv6. My network
is not IPv6 capabable, but my machine is. So I used "[::1]" instead if
"localhost" or "127.0.0.1". I doesn't work with "[::1]".

Told me, that PostgreSQL is only listening to IPv4:
$ ss -ln
127.0.0.1:5432                               *:*

So I modified the postgresql.conf:
FROM
#listen_addresses = 'localhost' 
TO
listen_addresses = '::'

And PostgresSQL starts to listen to IPv6:
$ ss -ln
:::5432                              :::*     

What I expect:
localhost means 127.0.0.1 if IPv4 is available OR ::1 if IPv6 is available.
This is a logical OR, that means booth at the same time are possible.

Thank you
Peter

[1]http://jdbc.postgresql.org/documentation/91/connect.html





^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #7677: listen_address 'localhost' listens not to IPv6 ::1
@ 2012-11-20 06:41  John R Pierce <pierce@hogranch.com>
  parent: bugs@ttyhoney.com
  0 siblings, 0 replies; 2+ messages in thread

From: John R Pierce @ 2012-11-20 06:41 UTC (permalink / raw)
  To: pgsql-bugs

On 11/19/12 5:26 AM, bugs@ttyhoney.com wrote:
> What I expect:
> localhost means 127.0.0.1 if IPv4 is available OR ::1 if IPv6 is available.
> This is a logical OR, that means booth at the same time are possible.

there's no magic to the name localhost, its just a hostname like any other.

whats in your /etc/hosts file?

I've seen systems where localhost is 127.0.0.1 and localhost6 is ::1... 
RHEL systems come that way.

127.0.0.1           localhost.localdomain localhost
::1                 localhost6.localdomain6 localhost6



-- 
john r pierce                            N 37, W 122
santa cruz ca                         mid-left coast





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2012-11-20 06:41 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-11-19 13:26 BUG #7677: listen_address 'localhost' listens not to IPv6 ::1 bugs@ttyhoney.com
2012-11-20 06:41 ` John R Pierce <pierce@hogranch.com>

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