From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: mindas@gmail.com
Cc: pgsql-admin@postgresql.org
Subject: Re: Establishing remote connections is slow
Date: Tue, 17 Jan 2012 11:36:40 -0600
Message-ID: <4F155D480200002500044884@gw.wicourts.gov> (raw)
In-Reply-To: <20244.1326820717@sss.pgh.pa.us>
References: <CAKTEH83nqC5NBZjWJ2ZAW8eBMWjW3N6G3RhbsWy68rMgf=MF1Q@mail.gmail.com>
<4F15517F0200002500044874@gw.wicourts.gov>
<4F15517F0200002500044874@gw.wicourts.gov>
<20244.1326820717@sss.pgh.pa.us>
Tom Lane <tgl@sss.pgh.pa.us> wrote:
> "Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
>> Mindaugas *ak*auskas<mindas@gmail.com> wrote:
>>> The essence is that establishing remote connection takes
>>> anywhere from 10 to 30 seconds. Once connected, the queries are
>>> fast
>
>> The only time I've seen something similar, there was no reverse
>> DNS entry to go from IP address to host name. Adding that
>> corrected the issue. I would try that.
>
>> If that fixes it, the questions would be whether PostgreSQL is
>> doing an unnecessary reverse DNS lookup.
>
> Having log_hostname off is supposed to prevent us from attempting
> a reverse DNS lookup ... but it would be worth checking into
> whether one is happening anyway. (I would think though that such
> activity would be visible in strace/truss output. Perhaps you
> should turn log_hostname *on* and verify that you see the lookup
> activity in strace that wasn't there before.)
Actually, where I've seen this sort of problem, it was the client
code which was doing the unnecessary reverse DNS lookup. What
controls this in psql?
-Kevin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: Kevin.Grittner@wicourts.gov, tgl@sss.pgh.pa.us, mindas@gmail.com
Subject: Re: Establishing remote connections is slow
In-Reply-To: <4F155D480200002500044884@gw.wicourts.gov>
References: <CAKTEH83nqC5NBZjWJ2ZAW8eBMWjW3N6G3RhbsWy68rMgf=MF1Q@mail.gmail.com> <4F15517F0200002500044874@gw.wicourts.gov> <20244.1326820717@sss.pgh.pa.us> <4F155D480200002500044884@gw.wicourts.gov>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox