Question

I'm using PostgreSQL 9.3 on RDS. Once in a while, I run a VACUUM FULL operation on the database. However, such operation can take quite a while and it blocks other tables, so the need to stop the operation might arise.

Is it safe to stop a VACUUM FULL operation that takes too long?

Was it helpful?

Solution

Yes, it is safe. Vacuum full will recreate the tables as new objects and only when they're done they will be put to use. If you cancel it, the new files not yet put to use will be removed and old ones will be kept.

Of course if you would cancel it by killing the process handling the vacuum there would be files left, but still the database would be intact.

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top