Recovering data from binary files?

From: Paulo Jan <admin(at)digital(dot)ddnet(dot)es>
To: pgsql-general(at)postgresql(dot)org
Cc: fvilches(at)mail(dot)ddnet(dot)es
Subject: Recovering data from binary files?
Date: 2000-05-08 14:59:37
Message-ID: 3916D659.C0139368@digital.ddnet.es
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Hi all:

Well, after my earlier post regarding pg_operator being corrupted, I
received a mail from one of the Postgres developers (I think) talking
about one of the system indexes (pg_attribute_relid_attnum_index) being
corrupted, so I gave it a try and copied said file from the template1
database to the one I have to recover... and now it gives me another
error: "cannot find attribute 1 of relation pg_user". Like before, I
can't even do a \d to see the existing tables in the database, much less
insert/update anything in the pg_* tables to fix it, and after
struggling the whole morning with it, I have pretty much given up on
that path.
I am trying now to:

1) Re-create the database in another machine.
2) Copy the binary files that contain the tables (minus the pg_* ones)
to the other server, in the place where the new database has been
created ($PGDATA/base/$dbname).
3) Try to access the tables from there using psql.

The problem now is that, although I can view the tables correctly, they
all come up as empty. All the SELECTs I try on them return nothing. And
the strange thing is that pg_class.reltuples says that said table has
5478 tuples, which is correct.
Any other ideas? Is there any other way to access the binary files and
extract the information in them to text? My manager is starting to talk
about migrating to SQL Server, and frankly, at this point I'm finding
less and less arguments to counter him...

Paulo Jan.
DDnet.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Philip Warner 2000-05-08 15:38:40 Re: So we're in agreement....
Previous Message Robert B. Easter 2000-05-08 14:38:41 RE: entity-relationship diagram software

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 2000-05-08 15:00:09 Ready to release?
Previous Message The Hermit Hacker 2000-05-08 13:17:36 logging problem ... ?