pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jerry LeVan <jerry.levan@gmail.com>
Cc: Peter J. Holzer <hjp-pgsql@hjp.at>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Psql wants to use IP6 when connecting to self using tcp...
Date: Wed, 23 Jun 2021 20:33:33 -0400
Message-ID: <2558211.1624494813@sss.pgh.pa.us> (raw)
In-Reply-To: <A1F5CBD0-64F7-469B-B971-AC316C52705F@gmail.com>
References: <E2F44383-6C51-4B0E-B26B-759ED4252BEF@gmail.com>
	<20210623175127.GB27765@hjp.at>
	<A1F5CBD0-64F7-469B-B971-AC316C52705F@gmail.com>

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





view thread (9+ messages)  latest in thread

Message-ID: <2558211.1624494813@sss.pgh.pa.us>
Permalink:  ../2558211.1624494813@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2558211.1624494813@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, jerry.levan@gmail.com, hjp-pgsql@hjp.at
  Subject: Re: Psql wants to use IP6 when connecting to self using tcp...
  In-Reply-To: <2558211.1624494813@sss.pgh.pa.us>
  References: <E2F44383-6C51-4B0E-B26B-759ED4252BEF@gmail.com> <20210623175127.GB27765@hjp.at> <A1F5CBD0-64F7-469B-B971-AC316C52705F@gmail.com> <2558211.1624494813@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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