Re: DNS vs /etc/hosts - Mailing list pgsql-general

From Tom Lane
Subject Re: DNS vs /etc/hosts
Date
Msg-id 15258.1123303130@sss.pgh.pa.us
Whole thread Raw
In response to Re: DNS vs /etc/hosts  (Lowell.Hought@faa.gov)
Responses Re: DNS vs /etc/hosts  (Michael Fuhr <mike@fuhr.org>)
List pgsql-general
Lowell.Hought@faa.gov writes:
> Your are correct in that 8.0 is doing a AAAA request first.  I am running
> Red Hat version 8.0.  The difference in the way 7.2 and 8.0 resolve the
> host option has to be because of the change from gethostbyname to
> getaddrinfo.  Is there some way I can force my machine to do an A search
> before a AAAA search?

On a recent RH system, "man 5 resolver" suggests that putting "options
inet6" into /etc/resolv.conf is what makes this happen ... if there is
such an entry on your system, try removing it.  RH 8.0 is a good ways
back though, so read the local version of that man page before doing
anything with that config file.

I concur with Michael's previous suggestion that the best answer
is to fix the clearly-broken DNS environment you're dealing with.
It is no longer acceptable for anyone to be running nameservers
that have not heard of IPv6 --- unless it's for a network that
only contains clients that have not heard of IPv6, which yours
evidently is not.  Have a word with your local network admin.

            regards, tom lane

pgsql-general by date:

Previous
From: Reid Thompson
Date:
Subject: Re: Insert ImageFile in PostgreSQL
Next
From: Brendan Jurd
Date:
Subject: timestamp default values