Re: dumping tables from badly damaged db

From: Brian Ristuccia <bristucc(at)sw(dot)starentnetworks(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: dumping tables from badly damaged db
Date: 2003-11-02 18:45:39
Message-ID: 20031102184538.GL24232@sw.starentnetworks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Fri, Oct 31, 2003 at 02:45:57PM -0500, Tom Lane wrote:
> Lather, rinse, repeat until it comes up ...
>

Ok. That excercise was certainly no fun. For the various system tables I was
missing, I managed to either find them in lost+found, or I copied the
version from template0. The files for some relatively unimportant tables
were irrecoverably destroyed.

Of course, I realize that my database is probably now in a percarious state.
I want to run a pg_dump, drop the db, and then rebuild into a fresh
database. Except for selects on the destroyed tables, my database works as
normal, so I'm confident I can get my data out.

But pg_dump refuses to run. It complains about the destroyed tables and also
something about plpgsql:

pg_dump: NOTICE: RelationBuildDesc: can't open deprecated_data1: No such file or directory
pg_dump: NOTICE: RelationBuildDesc: can't open unimportant_stuff: No such file or directory
pg_dump: handler procedure for procedural language plpgsql not found

I can't drop the tables from psql:

drop TABLE deprecated_data1 ;
ERROR: cannot open deprecated_data1: No such file or directory

Am I likely to have success by performing surgery on the pg_table relation
in order to remove these destroyed tables? Any hints on what I should do
about the procedural language issue?

--
Brian Ristuccia

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Brian Ristuccia 2003-11-02 19:56:45 Re: dumping tables from badly damaged db
Previous Message Mailing List 2003-11-02 11:53:21 Re: pgAdmin