Re: host name support in pg_hba.conf

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: host name support in pg_hba.conf
Дата
Msg-id AANLkTik5r1F0-_kB6rkAEDyDg8Oy=dyrTGCxQQkMdL4Y@mail.gmail.com
обсуждение исходный текст
Ответ на Re: host name support in pg_hba.conf  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: host name support in pg_hba.conf  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: host name support in pg_hba.conf  (Greg Stark <gsstark@mit.edu>)
Список pgsql-hackers
On Wed, Oct 6, 2010 at 15:16, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Andrew Dunstan <andrew@dunslane.net> writes:
>> On 10/06/2010 04:05 AM, Peter Eisentraut wrote:
>>> On tis, 2010-10-05 at 22:17 -0400, Tom Lane wrote:
>>>> So far as I can find, there is *no* standard
>>>> mandating that localhost means the loopback address.
>
>>> Should we then change pgstat.c to use IP addresses instead of hardcoding
>>> "localhost"?
>
>> I understood Tom to be saying we should not rely on "localhost" for
>> authentication, not that we shouldn't use it at all.
>
> I think it's all right to use it as the default value for
> listen_addresses, because (1) it's an understandable default,
> and (2) users can change the setting if it doesn't work.
>
> However, the usage in pgstat.c is hard-wired, meaning that if you
> have a configuration where "localhost" doesn't resolve correctly
> for whatever reason, there's no simple recourse to get the stats
> collector working.  So ISTM there is an argument for changing that.

Well, hardcoding it will break the (unusual) case when localhost isn't
127.0.0.1 / ::1. (You'd obviously have to have it try both ipv4 and
ipv6).

It's not common, but i've certainly come across a number of virtual
machines where localhost resolves (through /etc/hosts) to the machines
"real" IP rather than 127.0.01, because 127.0.0.1 simply doesn't
exist.

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: host name support in pg_hba.conf
Следующее
От: Tom Lane
Дата:
Сообщение: Re: host name support in pg_hba.conf