Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 063E36328D7 for ; Wed, 6 Jan 2010 00:51:00 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 63313-04 for ; Wed, 6 Jan 2010 04:50:48 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.postnewspapers.com.au (202-89-185-120.static.dsl.amnet.net.au [202.89.185.120]) by mail.postgresql.org (Postfix) with ESMTP id 3A2456327F4 for ; Wed, 6 Jan 2010 00:50:49 -0400 (AST) Received: from [10.0.0.53] (wallace.localnet [10.0.0.53]) by mail.postnewspapers.com.au (Postfix) with ESMTP id DC77B1E0436; Wed, 6 Jan 2010 12:50:47 +0800 (WST) Message-ID: <4B4416A7.1040808@postnewspapers.com.au> Date: Wed, 06 Jan 2010 12:50:47 +0800 From: Craig Ringer User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: Dmitri Girski CC: Andy Colson , pgsql-performance@postgresql.org Subject: Re: pg_connect takes 3.0 seconds References: <4B4354B0.8030400@squeakycode.net> In-Reply-To: X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.635 tagged_above=-10 required=5 tests=AWL=-2.554, BAYES_50=0.001, FH_DATE_PAST_20XX=3.188 X-Spam-Level: X-Archive-Number: 201001/58 X-Sequence-Number: 36938 Dmitri Girski wrote: > Hi Andy, > > I tried 2 connections strings: > - server name (DB1), which is listed in all machines hosts files. > - ip address. > > There is no difference in both methods, still I have 5-7 pg_connects which > last around 3 seconds. Don't rule out reverse DNS issues (such as a negative cache entry expiring and being re-checked), packet loss, nss issues on the server related to NIS, LDAP etc user directories, and so on. Wireshark is your friend. -- Craig Ringer