Vacuum is the default process of "PostgreSQL" itself. It reclaims the storage occupied by the dead tuples. During normal PostgreSQL operations, some tuples that are obsoleted or deleted by an update, are not removed physically from their tables. They remain there until a Vacuum process is run. It is recommended to execute the Vacuum process periodically, especially on those tables that are being updated frequently.
The data will be permanently removed from those databases, which will be selected for Vacuum. There is no way to restore the same. So, use this option consciously.
Figure: Vacuum Database
Perform the following steps to use the vacuum operation.
Perform Vacuuming and Reindexing for Custom Database: Click "Perform Vacuuming and Reindexing for the specific database to perform the vacuum operation on the selected database. Selecting it shows the following fields.
Figure: Details of Vacuum Process
Database Name: Provide the name of the database on which you want to perform the vacuum task.
Password: Enter the password of the database through which the database can be logged-in.
IP Address: Provide the IP address of the database.
Vacuum and Reindex: Enabling this feature gives the database permission to vacuum and Reindex the database with one command.
Vacuum only: This feature only allows the database to perform the vacuum function. This includes the deleting of unnecessary data only.
Reindex only: It allows the database to Reindex the wrong data positioning only.
Click "Vacuum" button to start the process.
The process may take few minutes to complete the process depending upon the size of the database.
Vacuum operation is also known as the "Garbage Management" operation of the Database.