Re: localhost redux
От | Steve Atkins |
---|---|
Тема | Re: localhost redux |
Дата | |
Msg-id | 20040720162528.GA27540@gp.word-to-the-wise.com обсуждение исходный текст |
Ответ на | Re: localhost redux (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
On Tue, Jul 20, 2004 at 08:32:00AM -0400, Tom Lane wrote: > "Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at> writes: > >> I think you should first trace down what the problem really is --- is > >> your system just misconfigured or is there some fundamental issue that > >> we really ought to answer to? > > > The trouble on AIX is, that getaddrinfo only does a nameservice lookup, > > no /etc/hosts. > > Wouldn't that break many other programs besides Postgres? But in any > case if your nameserver doesn't resolve localhost, I'd say you'd better > fix your nameserver. See eg, http://www.faqs.org/rfcs/rfc2606.html > > The ".localhost" TLD has traditionally been statically defined in > host DNS implementations as having an A record pointing to the > loop back IP address and is reserved for such use. Any other use > would conflict with widely deployed code which assumes this use. There is no requirement for a recursive resolver (local nameserver) to have localhost hardwired to return 127.0.0.1. It's not even clearly a good idea in all cases. If, though, the resolver returns anything for localhost it must be 127.0.0.1 (or, presumably, ::127.0.0.1). While many recursive resolvers do have localhost hardwired (to avoid this sort of issue) relying on it may be overly brave. It would be nice if the OP could check their recursive resolver to see what it is returning for a query for localhost ('dig @<nameserver> localhost', where <nameserver> is the nameserver listed in /etc/resolv.conf), just to check whether the DNS vs non-DNS localhost thing is an issue at all. Also whether they have /etc/netsvc.conf (IIRC) configured to use /etc/hosts or not. getaddrinfo() has had strange and unusual bugs on some older versions of AIX, anyway, so it may not be a DNS issue at all. Cheers, Steve
В списке pgsql-hackers по дате отправления: