How do I perform maintenance on PostgreSQL?

Created by: Brendan Bone
Created date:
Last Updated date:


How do I perform PostgreSQL maintenance like vacuuming and reindexing?



  1. Open PgAdmin3.exe or pgAdmin4.exe from:
    "C:\Program Files\AccessData\PostgreSQL\bin" (or)
    "C:\Program Files\AccessData\PostgreSQL\<version>\bin"
    "C:\Program Files\AccessData\PostgreSQL\9.6\pgAdmin 4\bin"
  2. Go to File > Add Server
    Name = FTK (or any unique name for the new connection)
    Host = localhost
    Port = the port PostgreSQL is running on
    Password = the password chosen while first installing PostgreSQL
  3. 'OK'
  4. Double-click the new "Server" entry created on the left
  5. Expand "Databases"
  6. For every "adg" and "case" database:
    - Right-click on the database
    - Select 'Maintenance'
    - From here you can run the following
         ~Vacuum (Under Vacuum options use FULL)
    After each run of the above options move to the next till all three are run on each database.

Keep in mind that any of these maintenance actions can take a while to complete and should not be interrupted, especially if you are trying to repair database corruption.


Performing maintenance on the database can sometimes help prevent or repair database corruption.  Often times corruption can be identified by seeing error messages like the one below in either the FTK_log.txt file (located "C:\ProgramData\AccessData\Products\Forensic Toolkit\<version>") or the PostgreSQL logs (located "[drive]:\pgData93\pg_log")

Error message:

could not read block 0 in file "pg_tblspc/642005/PG_9.3_201306121/16385/645221": read only 0 of 8192 bytes.

Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request


Powered by Zendesk