Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id F14D81DA4C1F for ; Tue, 17 Jan 2012 15:24:05 -0400 (AST) Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RnEdW-0006Pp-RO for pgsql-admin@postgresql.org; Tue, 17 Jan 2012 19:24:05 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id q0HJNmdS022687; Tue, 17 Jan 2012 14:23:48 -0500 (EST) To: "Kevin Grittner" cc: mindas@gmail.com, pgsql-admin@postgresql.org Subject: Re: Establishing remote connections is slow In-reply-to: <4F155D480200002500044884@gw.wicourts.gov> References: <4F15517F0200002500044874@gw.wicourts.gov><4F15517F0200002500044874@gw.wicourts.gov> <20244.1326820717@sss.pgh.pa.us> <4F155D480200002500044884@gw.wicourts.gov> Comments: In-reply-to "Kevin Grittner" message dated "Tue, 17 Jan 2012 11:36:40 -0600" Date: Tue, 17 Jan 2012 14:23:48 -0500 Message-ID: <22686.1326828228@sss.pgh.pa.us> From: Tom Lane X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201201/70 X-Sequence-Number: 38982 "Kevin Grittner" writes: > 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? psql? AFAIR psql itself doesn't do any such thing. It's possible that certain libraries such as SSL or Kerberos might do an RDNS lookup internally, though. The OP showed he was using md5 (password) authentication, so we can discount authentication libraries, but I wonder whether openssl ever does DNS lookups, and if so how to control that. Mindaugas, are you using SSL, and if so can you turn it off and see whether things change? (It should be safe to do so at least on the "localhost" connection, even if you feel your network is insecure.) regards, tom lane