Jean-Arthur Silve <jeanarthur@eurovox.fr> 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