I would like to schedule a vacuumdb cron job for an entire database, but I don't want it to run past a certain time. Is it safe to just stop the job with killall vacuumdb
?
Postgresql – Is it safe to kill vacuumdb
postgresqlvacuum
Related Question
- Postgresql – Removing records from database periodically that surpass timeline
- PostgreSQL 9.1: vacuumdb vs. autovacuum
- Postgresql – Reclaim disk space from dropped column without downtime
- Postgresql – Refresh postgres database on nightly basis
- Postgresql – Does cancelling an (AUTO)VACUUM process in PostgreSQL make all the work done useless
- Postgresql – delete hung soon after vacuum verbose analyse
- Postgresql upgrade generated vaccumdb script not vacuuming
Best Answer
Yes, it's safe. Use
SIGTERM
(the default, signal 15 on Linux) notSIGKILL
(signal 9). If it doesn't complete it might waste recent work and have to repeat it.However, you should really just let autovacuum do its job.