If the PostgreSQL won't start, and you have verified that the PostgreSQL service "ImagePath" is correct, there may be minor database corruption. Resetting the transaction logs may allow PostgreSQL to start again.
If there is corruption in the database, the PostgreSQL error logs, found in the "pg_log" folder within the PostgreSQL data folder, may show errors like "database system was interrupted while in recovery", "database system was not properly shut down; automatic recovery in progress", or "could not remove symbolic link "pg_tblspc/****": Permission denied."
IMPORTANT NOTE: You MUST make sure that all your junction links are in good order before resetting your transaction logs using this guide: Repair PostgreSQL Junction Links. If any of your junction links are broken before running this, your database can become unusable. Once that has been done these steps can be run with very little risk to the database at all.
- Open a Command Prompt (as Administrator).
- CD into the PostgreSQL bin folder (usually "C:\Program Files\AccessData\PostgreSQL\[version]\bin").
- Run the following command:
In Postgres 9.6 and older:
pg_resetxlog.exe [pgData folder location]
In Postgres 11.2 and newer:
pg_resetwal.exe [pgData folder location]
If you receive a message saying the server was not shut down cleanly and that you will need to force the reset, you may run the following command but you risk the chance of data loss:
pg_resetxlog.exe -f [pgData folder location]
- Wait to receive the message "Transaction log reset".
- Start the PostgreSQL service.
- Open FTK.
- Confirm that you are able to create new cases (it may take several attempts to successfully create a new case after resetting the transaction logs). If you are unable to create new cases, you will need to backup all existing cases, completely reinstall the database, and restore your cases.
Note: After resetting transaction logs you might no longer have access to the case(s) you were working on close to the time the database corruption occurred.