If you suspect database corruption, sometimes the best thing to do is to totally rebuild the database. This involves six steps:
The process may take 5-10 minutes, or more depending on the size of your database. If you want to check how long it will take before you start, then manually backup the database first. The full procedure will take approximately 3 or 4 as long as the database backup.
We have made a simple batch file to do this procedure for you. Download it and extract it into the main VPOP3 directory. Then, go to a command prompt in the VPOP3 directory and type 'rebuilddb'. It will ask for confirmation between each command in case problems occur.
You MAY get an error like this one - this can be ignored. It simply means that the restore was trying to create something which already existed.
pg_restore: [archiver (db)] Error while PROCESSING TOC: pg_restore: [archiver (db)] Error from TOC entry 804; 2612 16386 PROCEDURAL LANGUAGE plpgsql postgres pg_restore: [archiver (db)] could not execute query: ERROR: language "plpgsql" already exists Command was: CREATE PROCEDURAL LANGUAGE plpgsql;