Lamar Owen wrote:
> [snip]
> > 2) how do i schedule a regular vacuum through cron? do you not have to be
> > in psql to do a vacuum? or can you do it from the bash prompt? (we are
> > using linux rh 5.2, kernel 2.2.2, postgres 6.4.2)
>
> Again, my crontab (sub your database name for "intranet"):
>
> 0 1 * * * psql -q -c "vacuum analyze" intranet
>
> Under 6.5, you can issue the vacuumdb command from the shell.
>
Is there a way to use the vacuumdb command for *all* databases,
not just one? It'd be nice to be able to stick a command job in
postgres' crontab and forget about it (though obviously not
strictly necessary).
I run a perl script that selects the existing databases from, uh,
pg_database, I think, and then runs a vacuum command on
each. It's klunky, but it works. If anyone is interested, let
me know and I'll post and/or mail it. (It uses the perl Pg
module, which I believe comes with 6.5.)
--Keith
[EMAIL PROTECTED]