Is it Safe to Cancel a Vacuum?
search cancel

Is it Safe to Cancel a Vacuum?

book

Article ID: 296946

calendar_today

Updated On:

Products

VMware Tanzu Greenplum

Issue/Introduction

It is safe to cancel a Vacuum on a Greenplum cluster using the pg_cancel_backend and pg_terminate_back command within the database. On cancelling the VACUUM the database will safely rollback to before the VACUUM.

Canceling the vacuum will mean that the work done it up until it was canceled will be lost and the next vacuum on the table will start at the beginning again.

This is the same for all vacuums (Normal, Full, Freeze).

 


Environment

Product Version: 6.25

Resolution

Cancel the vacuum as you would any other process/session running in the Database. Please see the KB on how to cancel running sessions:

How-to-cancel-running-queries-OR-idle-sessions-

Note- Avoid using Operating System kill command to kill the Vacuum process as it may result in database crash/Postmaster Reset.

Additional Information