Re: vacuumdb with cronjob needs password since 9.0?

From: Jerry Sievers <gsievers19(at)comcast(dot)net>
To: Andreas Laggner <andreas(dot)laggner(at)vti(dot)bund(dot)de>
Cc: PostgreSQL Mailingliste <pgsql-general(at)postgresql(dot)org>
Subject: Re: vacuumdb with cronjob needs password since 9.0?
Date: 2011-05-12 11:14:45
Message-ID: 877h9w2msa.fsf@comcast.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Andreas Laggner <andreas(dot)laggner(at)vti(dot)bund(dot)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(at)comcast(dot)net
p: 305.321.1144

In response to

Browse pgsql-general by date

  From Date Subject
Next Message hubert depesz lubaczewski 2011-05-12 11:19:45 Re: vacuumdb with cronjob needs password since 9.0?
Previous Message Durumdara 2011-05-12 10:20:00 Re: Read Committed transaction with long query