1

I am newbie to PostgreSQL and using version 9.2.Disk space for data folder is full causing DB to stop. When i am trying to perform a vacuum to reclaim space, i am getting below error.

vacuumdb: vacuuming of database "mcfdb3" failed: ERROR: invalid page header in block 15871 of relation base/17148/30976

Can anybody help?

  • Any help please? – Finn Aug 31 '14 at 12:10
1

The error you pasted indicates that there has been corruption in your database. The best approach to dealing with this kind of corruption is to shut down the database, make a complete copy of all of the files, and then restore them to another system where forensics can be performed.

If you have a complete copy of your database, such that you can retrieve any valid data from it, then you can use the "zero_damaged_pages" configuration parameter in PostgreSQL to have invalid or damaged pages wiped out entirely, allowing the database to progress even in the face of corrupt or invalid data. Note that this option will cause you to lose valid data, as the entire page will be completely wiped out if any piece of it is deemed to be damaged or invalid.

Depending on the specific corruption which has occurred in this database, it may be possible to retrieve some of the data. This retrieval is extremely time consuming and requires expertise knowledge of the database system and is generally only sensible when the data is extremely valuable.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.