our RAID10 failed miserably and we now have a corrupted psql database. I copied the main/ folder and now are working with a copy trying to recover data. I have progressed far enough to have made an pg_resetxlog, which at least allowed me start up the database again. I have REINDEX and have made VACUUM and set to overwrite with zeros... At this point I get the
missing chunk number 0 for toast value x
unexpected chunk number 1 (expected 0) for toast value
using the script (taken from https://newbiedba.wordpress.com/2015/07/07/postgresql-missing-chunk-0-for-toast-value-in-pg_toast/)
for ((i=0; i<"Number_of_rows_in_nodes"; i++ )); do psql -U "Username" "Database Name" -c "SELECT * FROM nodes LIMIT 1 offset $i" >/dev/null || echo $i; done
and writing the results to a file, I get some 2000 ?lines? or ?IDs? of ?rows? that are affected. I don't know what to do from here on. I guess I have to delete the affected lines?
Thanks for the help! Bert