Re: vacuumdb with cronjob needs password since 9.0? - Mailing list pgsql-general

From Jerry Sievers
Subject Re: vacuumdb with cronjob needs password since 9.0?
Date
Msg-id 877h9w2msa.fsf@comcast.net
Whole thread Raw
In response to vacuumdb with cronjob needs password since 9.0?  (Andreas Laggner <andreas.laggner@vti.bund.de>)
List pgsql-general
Andreas Laggner <andreas.laggner@vti.bund.de> writes:

> Hi list,
>
> i always vaccumed my postgresql automatically with crontab, because
> autovacuum is not suitable for my applications. With version 8.2 it
> works perfect for me with this command line:
>
> 00 02 * * *    postgres /usr/bin/vacuumdb -d gis -z
>
> But not with 9.0, because vacuumdb now wants to have the password to
> connect to the db.
> i did not find any options to send the password with the command line
> in vacuumdb!?

Password on command line a bad habit anyway and especially for a
possibly long running job like vacuumdb.

Have a look at setting the pw in the .pgpass file for the invoking user.

If you insist on doing it on cmd line; try;

PGPASSWORD=foo vacuumdb ...

HTH

--
Jerry Sievers
Postgres DBA/Development Consulting
e: gsievers19@comcast.net
p: 305.321.1144

pgsql-general by date:

Previous
From: Durumdara
Date:
Subject: Re: Read Committed transaction with long query
Next
From: hubert depesz lubaczewski
Date:
Subject: Re: vacuumdb with cronjob needs password since 9.0?