Re: BUG #9518: temporary login failure - "missing pg_hba entry"

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: BUG #9518: temporary login failure - "missing pg_hba entry"
Дата
Msg-id
852.1396320840@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
BUG #9518: temporary login failure - "missing pg_hba entry" mike.blackwell@rrd.com
Re: BUG #9518: temporary login failure - "missing pg_hba entry" Alvaro Herrera <alvherre@2ndquadrant.com>
Re: BUG #9518: temporary login failure - "missing pg_hba entry" Mike Blackwell <mike.blackwell@rrd.com>
Re: BUG #9518: temporary login failure - "missing pg_hba entry" Mike Blackwell <mike.blackwell@rrd.com>
Re: BUG #9518: temporary login failure - "missing pg_hba entry" Alvaro Herrera <alvherre@2ndquadrant.com>
Re: BUG #9518: temporary login failure - "missing pg_hba entry" Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #9518: temporary login failure - "missing pg_hba entry" Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #9518: temporary login failure - "missing pg_hba entry" Mike Blackwell <mike.blackwell@rrd.com>
Re: BUG #9518: temporary login failure - "missing pg_hba entry" Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #9518: temporary login failure - "missing pg_hba entry" Mike Blackwell <mike.blackwell@rrd.com>
Re: BUG #9518: temporary login failure - "missing pg_hba entry" Venkata Balaji Nagothi <vbnpgc@gmail.com>
Alvaro Herrera  writes:
> Mike Blackwell wrote:
>>​This particular host is listed in pg_hba.conf by host name rather than by
>> IP address.  Is it possible this error is due to an intermittent DNS
>> failure?​

> Doesn't look like it; that code has this:
> 	ret = getaddrinfo(port->remote_hostname, NULL, NULL, &gai_result);
> 	if (ret != 0)
> 		ereport(ERROR,
> 				(errmsg("could not translate host name \"%s\" to address: %s",
> 						port->remote_hostname, gai_strerror(ret))));

Don't think that proves a lot.  Before we do that, we attempt to do a
reverse IP-to-name lookup, and AFAICS if that fails we just return
silently.  The code you're quoting complains if the later cross-check
on the name's forward DNS resolution fails --- but we might never get
to that.

IOW, it looks to me like intermittent failures in the reverse DNS lookup
could disable matching by hostname, and nothing would be said in the
postmaster log.  Why is there no complaint if check_hostname's call to
pg_getnameinfo_all (line 600 in HEAD) fails?

			regards, tom lane
В списке pgsql-bugs по дате отправления
От: Alvaro Herrera
Дата:
От: GEV.NET
Дата:
FAQ