[racket] postgres connect problem - unexpected 'password required' error

From: Thomas Lynch (thomas.lynch at reasoningtechnology.com)
Date: Thu Jan 1 10:20:56 EST 2015

On Thu, Jan 1, 2015 at 6:25 PM, Neil Van Dyke <neil at neilvandyke.org> wrote:

> Thomas Lynch wrote on 01/01/2015 03:30 AM:
>
>> I am having difficulty connecting to the postgres server from Racket.  It
>> asks for a password, but role and authentication is set up so that the
>> logged in local user does not need one.
>>
>>
> Is `psql` is using a Unix domain socket to talk to PG,
> `postgresql-connect` is using a `localhost` TCP port to PG, and your
> `/etc/postgresql/*/main/pg_hba.conf` is configured to have different
> authentication for the two different methods?
>

By gosh you are correct, this is the default for pg_hba.conf with the
debian package install:


>
> If so, try either adding `#:socket 'guess` to your `postgresql-connect`
> call, or modifying your `pg_hba.conf` (and restarting PG).
>
> If that's not quite it, try also adding `#:ssl 'yes` to
> `postgresql-connect`, or modifying `pg_hba.conf` again.
>
> If that's not it, check for PG environment variables that `psql` could be
> using.  Also, you can test the different methods by supplying different
> `conninfo` strings on the `psql` command line.
>
> Neil V.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20150101/6236d5d7/attachment.html>

Posted on the users mailing list.