Page 1 of 1

Problem with database

PostPosted: Sun Mar 11, 2012 5:50 pm
by InspectorPL
Hi,

today I wanted to run database housekeeping and after several minutes following error / message appeared: "Unable to execute query: VACUUM ANALYZE;; Reason: Fatal Error (ERROR: invalid page header in block 54356 of relation base/17742/21485 )". Similar effect when I went directly into postgres pgAdmin and tried to vacuum database from there.
Question: can it influence performance of the program / database ? Can I "clean" it in any way?

regards,
Janusz

PS. PT 4.01.9, Postgres 8.4.10

Re: Problem with database

PostPosted: Mon Mar 12, 2012 4:34 am
by WhiteRider
That suggests a file error, which could be a hardware problem. If one of the files which makes up your database is damaged it may not be recoverable.
You can try setting PostgreSQL to ignore these errors by clicking Start --> Programs --> PostgreSQL --> Configuration Files --> Edit postgresql.conf. In the configuration file that appears, go to the bottom of the file and add the text “zero_damaged_pages = on” on a new line and then save and close the file. Click Start --> Programs --> PostgreSQL --> Reload Configuration and PostgreSQL will ignore the damaged data. If you continue to have problems with that hard drive, you should consider replacing it.
Try running chkdsk to see if it finds any disk errors.
If that doesn't remove the error you will need to create a new database and reimport your hands.

Re: Problem with database

PostPosted: Tue Mar 13, 2012 4:57 pm
by InspectorPL
Hi, thanks for suggestion! Indeed, chkdsk helped. It's a bit surprising, because this disk is actually a RAID array (mirror), so I didn't expect any error... Anyway, after chkdsk /f I successfully run vacuuing.