X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 18C5E14B28C8 for ; Thu, 12 Aug 2004 01:43:15 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 54993-08 for ; Thu, 12 Aug 2004 04:43:06 +0000 (GMT) Received: from ns.albatross.co.nz (ns1.albatross.co.nz [203.97.5.1]) by svr1.postgresql.org (Postfix) with SMTP id C6D6414B28C6 for ; Thu, 12 Aug 2004 01:43:03 -0300 (ADT) Received: (qmail 12471 invoked from network); 12 Aug 2004 04:43:01 -0000 Received: from unknown (HELO localhost.localdomain) (203.97.5.193) by pestilence.albatross.co.nz with SMTP; 12 Aug 2004 04:43:01 -0000 Subject: Re: corrupt DB recovery From: Drew Whittle To: Tom Lane Cc: pgsql-admin@postgresql.org In-Reply-To: <24307.1092284518@sss.pgh.pa.us> References: <1092280216.25843.28.camel@mcp> <24307.1092284518@sss.pgh.pa.us> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.5 Date: 12 Aug 2004 16:43:01 +1200 Message-Id: <1092285781.8367.48.camel@mcp> Mime-Version: 1.0 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200408/86 X-Sequence-Number: 14481 On Thu, 2004-08-12 at 16:21, Tom Lane wrote: > > You could try that, but unless the db's also have identical history (in > the sense of the same set of transaction numbers that committed) it's > unlikely to work. I think your problem is not that pg_class is buggered > per se, so much as that you did not have correct pg_clog data to match it. > The data files and the log files are an interlocking whole, you can't > just plug in one part at random. I know your the expert and everything, but we will have to see if I can get the data back or not. (I like a good challenge!) A bit more research has given me some of the info I need and I now have the buggered db up and running (although currently in a failing state - but I'm fairly confident that I can fix that.) > > Any other suggestions that might get the data back or should I just > > forget it and tell them to key it again? > > If you did extract something from this mess, how much could you trust > it? Not a lot, because the bad-clog problem will affect visibility of > rows in the user tables too. > Only if it was a bad-clog problem. Due to the nature of that data it is fairly easy to tell any corrupt items. > I'm afraid you're screwed :-(. Maybe you could learn something about > proper backup procedures though. The backup you have obviously didn't > work well --- how did you take it exactly? > Actually the backup went fine, restored fine to the alternate machine, I'm attempting to get the data back (if any) that was input between the backup time and the crash time. Thanks for you past and present comments (earlier posts by you to the list have helped me with this problem) Thx, Drew