Re: Trying to handle db corruption 9.6 - Mailing list pgsql-performance

From Mariel Cherkassky
Subject Re: Trying to handle db corruption 9.6
Date
Msg-id CA+t6e1=j8hwY-LCgN461-bCNB4ODxG6LNTHD9=uHko7ZAHy-fA@mail.gmail.com
Whole thread Raw
In response to Trying to handle db corruption 9.6  (Mariel Cherkassky <mariel.cherkassky@gmail.com>)
Responses Re: Trying to handle db corruption 9.6  (Bimal <internetuser2008@yahoo.com>)
List pgsql-performance
A backup was made after the corruption appeared but before I tried using the pg_resetxlog command. Basically I just want to start the database with the data that is available in the files(I'm ok with loosing data that was in the cache and wasnt written to disk).
My question is how can I continue from here ?
I also sent this mail to pgadmin mail list..

‫בתאריך יום ב׳, 20 במאי 2019 ב-18:59 מאת ‪Greg Clough‬‏ <‪Greg.Clough@ihsmarkit.com‬‏>:‬

> Yes I understand that.. I'm trying to handle it after the backup that I have taken..


IMHO the best option here is to keep safe a copy as you have already done and then restore from a backup, and replay whatever WAL you have.  The database you have is terminally corrupted, and should never be relied upon going forward.

 

You can try to get it running, and then extract the data with pg_dump... but even then you will need to manually verify it’s OK because you have no idea which dirty blocks from memory have been written to disk and which have not.  Without the WAL you have no way of making it consistent, and if they have been destroyed then you’re out of luck.

 

If you don’t have backups and archived WAL then fixing what you’ve got may be your only option, but you should only go down that route if you have to.  If you have to “repair”, then I’d recommend engaging a reputable PostgreSQL consultancy to help you.

 

Regards,

Greg.

P.S.  This conversation should probably be moved to something like pgsql-admin
             

 




This e-mail, including accompanying communications and attachments, is strictly confidential and only for the intended recipient. Any retention, use or disclosure not expressly authorised by IHSMarkit is prohibited. This email is subject to all waivers and other terms at the following link: https://ihsmarkit.com/Legal/EmailDisclaimer.html

Please visit www.ihsmarkit.com/about/contact-us.html for contact information on our offices worldwide.

pgsql-performance by date:

Previous
From: Mariel Cherkassky
Date:
Subject: Re: Trying to handle db corruption 9.6
Next
From: Bimal
Date:
Subject: Re: Trying to handle db corruption 9.6