Thread: BUG #17283: localhost should also include IPv6

BUG #17283: localhost should also include IPv6

From
PG Bug reporting form
Date:
The following bug has been logged on the website:

Bug reference:      17283
Logged by:          treysis
Email address:      treysis@gmx.net
PostgreSQL version: 14.1
Operating system:   Windows and Linux
Description:

Currently, PostgreSQL defaults to listen on 'localhost', which translates to
single-stack IPv4 loopback address 127.0.0.1. However, IPv6 is more and more
prevalent, not everything support happy eyeballs. Therefor, when no
listen_addresses are specified and/or if localhost is specified, this should
not default to 127.0.0.1, but instead to '127.0.0.1, ::1' to make PostreSQL
listen both on IPv4 and IPv6 loopback interfaces.

This especially fixes issues with the latest NodeJS v17.


Re: BUG #17283: localhost should also include IPv6

From
Tom Lane
Date:
PG Bug reporting form <noreply@postgresql.org> writes:
> Currently, PostgreSQL defaults to listen on 'localhost', which translates to
> single-stack IPv4 loopback address 127.0.0.1.

The definition of "localhost" is determined by your local DNS
configuration, not by Postgres.

            regards, tom lane