Re: Trying to handle db corruption 9.6

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx‬‏>:‬

> 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.

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux