From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Jon Jensen <jon(at)endpoint(dot)com> |
Cc: | 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-01-02 19:06:38 |
Message-ID: | 8029.1136228798@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Jon Jensen <jon(at)endpoint(dot)com> writes:
> On Mon, 2 Jan 2006, Tom Lane wrote:
>> Can you demonstrate that this is actually a serious concern next to the
>> total time spent launching a backend? I can't measure any real change
>> in total time for "psql -l" when log_hostname is enabled, which should
>> be a comparable hit.
> The difference is negligible when using a UNIX socket (of course) or names
> listed in /etc/hosts. But it's certainly slower in my tests if you really
> use DNS. On a run of 1000 connections doing "psql -l", it takes 18.89s
> without the DNS lookup for log_hostname, and 31.5s with. Or run as a
> one-off, it's 0.032 to 0.041s.
Um --- I was testing a local-loopback connection, but now that I look at
the nsswitch.conf setup, it was going to /etc/hosts for that case.
Coming across the network so that a real DNS lookup is forced, there
seems to be a difference of about 4ms (note this is with a local DNS
daemon). I don't think that's significant. If it is, you've got other
performance problems anyway, and should switch to pooled connections to
reduce the number of backend launches.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-01-02 19:12:03 | Re: What bison versions are installed on buildfarm machines? |
Previous Message | Joshua D. Drake | 2006-01-02 19:00:21 | Re: What bison versions are installed on buildfarm machines? |