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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2004-07-04 23:23:43 Re: .pgpass
Previous Message Oliver Elphick 2004-07-04 21:21:10 Re: .pgpass