by kraada » Wed Dec 16, 2009 11:37 am
There are two main reasons for this error. The first is a result of data corruption from a computer crash that requires reindexing your database. You can reindex your database from the PostgreSQL command prompt. Click Start --> Programs --> PostgreSQL --> Command Prompt. At the prompt that appears, type "reindexdb -a" and hit enter. Be aware that if you have large databases this may take a while, so be patient and wait for it to finish.
The second reason for this error is a result of faulty hardware. You can set 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.