Skip site navigation (1) Skip section navigation (2)

Re: .pgpass

From: <ghaverla(at)freenet(dot)edmonton(dot)ab(dot)ca>
To: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: .pgpass
Date: 2004-07-04 21:41:55
Message-ID: Pine.A41.3.95.1040704153727.20444B-100000@fn2.freenet.edmonton.ab.ca (view raw or flat)
Thread:
Lists: pgsql-novice
On Sun, 4 Jul 2004, Oliver Elphick wrote:
> On Sun, 2004-07-04 at 20:41, ghaverla(at)freenet(dot)edmonton(dot)ab(dot)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


In response to

  • Re: .pgpass at 2004-07-04 21:21:10 from Oliver Elphick

pgsql-novice by date

Next:From: Tom LaneDate: 2004-07-04 23:23:43
Subject: Re: .pgpass
Previous:From: Oliver ElphickDate: 2004-07-04 21:21:10
Subject: Re: .pgpass

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group