Re: Why don't we allow DNS names in pg_hba.conf?

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Mark Woodward <pgsql(at)mohawksoft(dot)com>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, mark(at)mark(dot)mielke(dot)cc, Euler Taveira de Oliveira <eulerto(at)yahoo(dot)com(dot)br>, "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>, Andreas Pflug <pgadmin(at)pse-consulting(dot)de>, "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Why don't we allow DNS names in pg_hba.conf?
Date: 2006-02-13 15:30:39
Message-ID: 43F0A61F.7000503@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Mark Woodward wrote:

>>Mark Woodward wrote:
>>
>>
>>
>>>>Added to TODO:
>>>>
>>>> o Allow pg_hba.conf to specify host names along with IP
>>>>addresses
>>>>
>>>> Host name lookup could occur when the postmaster reads the
>>>> pg_hba.conf file, or when the backend starts. Another
>>>> solution would be to reverse lookup the connection IP and
>>>> check that hostname against the host names in pg_hba.conf.
>>>> We could also then check that the host name maps to the IP
>>>> address.
>>>>
>>>>
>>>>
>>>>
>>>I'm not so sure you need to be paranoid about it. The scenario is, at
>>>startup or HUP, names are looked up and stored as IP addresses. Then hba
>>>works as it is supposed too.
>>>
>>>
>>>
>>>
>>If you do it like that you destroy the only real use case I can see for
>>this that has much value, namely to handle cases where the address can
>>change dynamically.
>>
>>
>
>How "dynamically" are you talking about?
>
>If you are using a DNS server, what is your TTL on the records? A simple
>-HUP once every half hour is more than sufficient. If you are using ssh to
>update the hosts file, adding a simple -HUP tp the script is not a big
>deal.
>
>
>

If I am a road warrior I want to be able to connect, run my dynamic dns
client, and go.

HUPing the postmaster every 30 minutes sounds horrible, and won't work
for what strikes me as the scenario that needs this most. And we surely
aren't going to build TTL logic into postgres.

I repeat - let's do this the simple way.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Naeslund(f) 2006-02-13 15:39:58 Re: Postgresql crash (signal 11). keywords: distinct, subselect,
Previous Message Andrew Dunstan 2006-02-13 15:00:34 Re: Why don't we allow DNS names in pg_hba.conf?