Thread: Recover from data corruption?

Recover from data corruption?

From
"Worth Bishop"
Date:
I'm a novice PostgreSQL admin, running 7.2 on FreeBSD 4.6.

I copied a directory containing a web application that interfaces with a
PostgreSQL database. First time the application was accessed, the system
indicated the database was not running. Restarted the database, no PostgeSQL
errors in logfile or at console. However, now each time a request is made
against the database, the server console displays the following error:

ad0s1f: hard error reading fsbn 91219263 of 4145297 - 41415327 (ad0s1 bn
91219263; cn 5678 tn 34 sn 51) trying PIO mode
ad0: DMA problem fallback to PIO mode

Then, repeated messages:

ad0s1f: hard error reading fsbn 91219279 of 4145296 - 41415327 (ad0s1 bn
91219279; cn 5678 tn 35 sn 4) status=59 error=40

I can access the database using psql.

The error message suggests a hard drive trying to die, but since it came
hard on the heels of my actions, I have to believe I've corrupted the data.

Is there any way to reindex or otherwise recover from this?

Any thoughts or suggestions?

Thanks.