> -----Original Message-----
> From: pgsql-general-owner@hub.org
> [mailto:pgsql-general-owner@hub.org]On Behalf Of Paulo Jan
> Sent: Tuesday, May 09, 2000 12:00 AM
> To: pgsql-general@postgresql.org
> Cc: fvilches@mail.ddnet.es
> Subject: [GENERAL] Recovering data from binary files?
>
>
> 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).
Oh it seems almost same as pg_upgrade.
However you should probably copy pg_log and pg_variable to
$PGDATA as pg_upgrade does.
In addtion if postmaster is running,you should shutdown before
processing 2).
Regards.
Hiroshi Inoue
Inoue@tpf.co.jp
> 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.
>