From: Ross J. Reedstrom <reedstrm@rice.edu>
To: Ignacio Coloma <icoloma-lists@iverdino.com>
Cc: Wei Weng <wweng@kencast.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: running psql in a cron job
Date: Wed, 7 Aug 2002 13:54:09 -0500
Message-ID: <20020807185409.GB9661@rice.edu> (raw)
In-Reply-To: <3D5160BF.2040804@iverdino.com>
References: <1028731885.30770.2.camel@Monet>
<1028732473.30770.4.camel@Monet>
<3D5160BF.2040804@iverdino.com>
On Wed, Aug 07, 2002 at 06:02:39PM +0000, Ignacio Coloma wrote:
> Maybe I'm a bit lost: if cron is executed as root, then su <user> -c
> 'command' would work without providing the password?
>
> I mean, putting the password plain text anywhere doesn't seem that nice
> idea imho
It's not the unix 'postgres' user's password: it's the database password
for the DB user - a completely independent user/password pair.
Ross
>
> Wei Weng wrote:
>
> >never mind. a quick search in the mailing list archive solved the
> >problem. :)
> >
> >Just use PGPASSWORD=my_pass psql -c "VACUUM ANALYZE" -d my_data -U
> >my_user
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: reedstrm@rice.edu, icoloma-lists@iverdino.com, wweng@kencast.com
Subject: Re: running psql in a cron job
In-Reply-To: <20020807185409.GB9661@rice.edu>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox