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 18DC614B27FC for ; Thu, 12 Aug 2004 00:10:35 -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 66647-02 for ; Thu, 12 Aug 2004 03:10:25 +0000 (GMT) Received: from ns.albatross.co.nz (ns1.albatross.co.nz [203.97.5.1]) by svr1.postgresql.org (Postfix) with SMTP id 4750E14B281A for ; Thu, 12 Aug 2004 00:10:20 -0300 (ADT) Received: (qmail 4241 invoked from network); 12 Aug 2004 03:10:16 -0000 Received: from unknown (HELO localhost.localdomain) (203.97.5.193) by pestilence.albatross.co.nz with SMTP; 12 Aug 2004 03:10:16 -0000 Subject: corrupt DB recovery From: Drew Whittle To: pgsql-admin@postgresql.org Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.5 Date: 12 Aug 2004 15:10:16 +1200 Message-Id: <1092280216.25843.28.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/84 X-Sequence-Number: 14479 Hi Folks, One of our production db's went down the other day, I have restored it from backup to another server and now I am attempting to recover as much of the data that was entered since the last backup. Anyway, if I attempt to connect to the DB using psql I get the old missing pg_clog entry error, in an attempt to fix that I created a 256k 0 filled file of the correct name. The next attempt to connect via psql gets me a "no pg_class entry for pg_proc" error. If I start the db up in standalone mode the above error comes up and the db immediately shuts down again. I have attempted to scan across the data files for this db with pg_filedump and it is not reporting any corrupted blocks. (but I'm not sure I was doing it correctly) I have two other db's that are 100% identical in everything but name and data. (ie same structure etc), is it possible to use one of that data files in them to over write the buggered file and fix the pg_proc error? (and if so, is there an easy way to figure out which one, ie is pg_class always in the 1249 data file?) Any other suggestions that might get the data back or should I just forget it and tell them to key it again? Thx, Drew