Re: Psql wants to use IP6 when connecting to self using tcp... - Mailing list pgsql-general

From Tom Lane
Subject Re: Psql wants to use IP6 when connecting to self using tcp...
Date
Msg-id 2558211.1624494813@sss.pgh.pa.us
Whole thread Raw
In response to Re: Psql wants to use IP6 when connecting to self using tcp...  (Jerry LeVan <jerry.levan@gmail.com>)
Responses Re: Psql wants to use IP6 when connecting to self using tcp...  ("Peter J. Holzer" <hjp-pgsql@hjp.at>)
List pgsql-general
Jerry LeVan <jerry.levan@gmail.com> writes:
> bigbox has a freshly installed Fedora 34 system and it runs postgresql 13.3

> the following are being run ON bigbox

> nslookup bigbox  returns the correct ipv4 address
> nslookup bigbox.skynet returns the correct ipv4 address

> psql -h bigbox.skynet allows me to connect to the database
> psql -h bigbox  fails because the ipv6 address is returned and there is no hba entry..

It's quite odd that nslookup isn't agreeing with glibc's name
resolution code.  I suspect that the problem lies with systemd, which
has relentlessly continued its campaign to break everything in sight,
and has lately gotten its fingers into name resolution as well:

https://fedoraproject.org/wiki/Changes/systemd-resolved

Perhaps something on that page will help you figure out what's up.
My guess based on what you've said here is that nslookup and glibc
are not using the same DNS search path.  Traditionally that would be
set by a "search" line in /etc/resolv.conf, but ghod knows how it's
determined under systemd-resolved.

            regards, tom lane



pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Partitioned Table Index Column Order
Next
From: David Rowley
Date:
Subject: Re: Partitioned Table Index Column Order