Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id BC6634758E3 for ; Mon, 1 Jul 2002 11:19:20 -0400 (EDT) Mailbox-Line: From tgl@sss.pgh.pa.us Mon Jul 1 11:19:20 2002 Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id E460947589A for ; Mon, 1 Jul 2002 11:19:15 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.4/8.11.4) with ESMTP id g61FJ4213799; Mon, 1 Jul 2002 11:19:04 -0400 (EDT) To: Jean-Arthur Silve Cc: pgsql-admin@postgresql.org Subject: Re: Slow Remote connection In-reply-to: <5.1.0.14.0.20020701143750.036a7680@mail.eurovox.fr> References: <5.1.0.14.0.20020624162309.0407dbd0@mail.eurovox.fr> <001f01c2191d$1677ef60$543c620a@catnet.com.br> <5.1.0.14.0.20020624162309.0407dbd0@mail.eurovox.fr> <5.1.0.14.0.20020701143750.036a7680@mail.eurovox.fr> Comments: In-reply-to Jean-Arthur Silve message dated "Mon, 01 Jul 2002 14:41:57 +0200" Date: Mon, 01 Jul 2002 11:19:04 -0400 Message-ID: <13796.1025536744@sss.pgh.pa.us> From: Tom Lane X-Spam-Status: No, hits=-5.3 required=5.0 tests=IN_REP_TO,X_NOT_PRESENT version=2.30 X-Spam-Level: X-Archive-Number: 200207/2 X-Sequence-Number: 4689 Jean-Arthur Silve writes: > I tried to connect with psql -h 127.0.0.1 mydb and it's slow (+/- 5 sec.) > and psql mydb is fast ( less than 1 sec.) ! > Here is my pg_hba : > local all trust > host all 127.0.0.1 255.255.255.255 trust > host all my_ip 255.255.255.255 trust Weird. You're using trust in both cases, so there's no reason for authentication to make any difference. The only thing I can think of is that something is wrong with DNS name resolution. Do you have hostname_lookup enabled in postgresql.conf? Does changing it to the other setting make any difference? (Don't forget to SIGHUP the postmaster after changing postgresql.conf, else it won't notice.) regards, tom lane