Received: from sss.pgh.pa.us ([192.204.191.242]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f8U3u2O53990 for ; Sat, 29 Sep 2001 23:56:02 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) 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 f8U3tpI00802; Sat, 29 Sep 2001 23:55:52 -0400 (EDT) To: Russ McBride cc: nickf@ontko.com, pgsql-admin@postgresql.org Subject: Re: authentication problems In-reply-to: References: <358.1001818864@sss.pgh.pa.us> <530.1001820519@sss.pgh.pa.us> Comments: In-reply-to Russ McBride message dated "Sat, 29 Sep 2001 20:56:29 -0700" Date: Sat, 29 Sep 2001 23:55:51 -0400 Message-ID: <799.1001822151@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200109/145 X-Sequence-Number: 2246 Russ McBride writes: > Typing "/usr/local/pgsql/bin/psql -h localhost testdb" starts up my > database in psql quite nicely, which seems to indicate to me that the > pg_hba.conf is being read and the line: > local all trust > is working as expected (I assume that this is the line that allows > all local UNIX socket connections). You assume wrong: "-h localhost" triggers a connection over IP, not over UNIX sockets. Specifically, it's going to match the pg_hba.conf line that mentions 127.0.0.1. At this point I think your problem is that your JDBC setup is trying to connect to your machine by name, not by the "localhost" alias, and this results in a connection via your current network IP address rather than the 127.0.0.1 loopback address. Since you have an entry in pg_hba.conf for 127.0.0.1 and not the other address, only the localhost address will work. regards, tom lane