Re: .pgpass - Mailing list pgsql-novice

From
Subject Re: .pgpass
Date
Msg-id Pine.A41.3.95.1040704153727.20444B-100000@fn2.freenet.edmonton.ab.ca
Whole thread Raw
In response to Re: .pgpass  (Oliver Elphick <olly@lfix.co.uk>)
List pgsql-novice
On Sun, 4 Jul 2004, Oliver Elphick wrote:
> On Sun, 2004-07-04 at 20:41, ghaverla@freenet.edmonton.ab.ca wrote:
> > + /usr/bin/psql -d template1 -t -q -X
> > Password:
> > psql: fe_sendauth: no password supplied
> >
> > My guess is it is that -X (disallow reading of a .psqlrc file) is
> > somehow turning off the reading of any .pgpass file.
>
> I can't see how that could be.  -X is a psql option, but .pgpass is read
> by the libpq library, which has no knowledge of the psql options.

Well, -X is one of the few switches common to both commands.
Reading .pgpass seems to me, to be some kind of initialization
thing.  That is all I based me guess on.

> Can you check that do.maintenance is being run by the correct user? (Put
> the line "user identity = `id`" somewhere near the top.)  Also, see if
> do.maintenance works when run directly rather than through cron.

I already have the output of env in the cron script.  According to
that, it is postgres that it is being run as.

X-Cron-Env: <HOME=/var/lib/postgres>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=postgres>
...
HOME=/var/lib/postgres
SHLVL=2
LOGNAME=postgres
...


But, we'll check that too.

Gord


pgsql-novice by date:

Previous
From: Oliver Elphick
Date:
Subject: Re: .pgpass
Next
From:
Date:
Subject: Re: .pgpass