Error: The transaction has aborted.
Problem
"The transaction has aborted" error occurred on PostgreSQL 8.3.6.
This is because the database became corrupt due to the backup (ex: tape) running while writes were being done to the database. The specific nature of the corruption is that writes didn't work, though reads did.
Solution
To prevent this from occurring in the future exclude the PostgreSQL\X.X\data directory from the backup.
To get the database fixed:
In case of catastrophic failure in the below process (no good DB backup and can't get one) make a note of all configuration data. This is data that isn't stored in the repository. The following list is not complete:
configuration
asset_folder_access
asset_access
group_table
privilege
group_privilege
custom_table_def
custom_field_def
custom_field_list_item
Make sure you have a backup of the database (the file created by the backup script)
A backup of the database created on the corrupt database may have missing data due to the corruption, so a previous backup is needed. If one is not available create one now and hope for the best. If it doesn't work you will have to re-enter all config settings and data
Uninstall PostgreSQL
Rename the data directory
Re-install PostgreSQL
Use the same postgres service account
Set the postgres superuser password in PgAdmin III
Create the foraydbadmin account
Create the ForayAdams database
Restore the data
Create a copy of the backup file
Rename the copy to have a .zip extension
Unzip the file
Move the unzipped file to the PostgreSQL\X.X\bin directory
Restore the data: psql -U postgres -f <backup file name> ForayAdams
If you can't restore or are missing data you will have to run Rebuild Adams Database.exe
Related articles
© 2023 Foray, LLC - All Rights Reserved