Re: vacuumdb with cronjob needs password since 9.0?

Поиск
Список
Период
Сортировка
От Jerry Sievers
Тема Re: vacuumdb with cronjob needs password since 9.0?
Дата
Msg-id 877h9w2msa.fsf@comcast.net
обсуждение исходный текст
Ответ на vacuumdb with cronjob needs password since 9.0?  (Andreas Laggner <andreas.laggner@vti.bund.de>)
Список 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 по дате отправления:

Предыдущее
От: Durumdara
Дата:
Сообщение: Re: Read Committed transaction with long query
Следующее
От: hubert depesz lubaczewski
Дата:
Сообщение: Re: vacuumdb with cronjob needs password since 9.0?