Re: recover of data directory

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Daniel Drotos <drdani(at)mazsola(dot)iit(dot)uni-miskolc(dot)hu>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-admin(at)postgresql(dot)org
Subject: Re: recover of data directory
Date: 2006-05-29 15:28:15
Message-ID: 20060529152814.GF22206@surnet.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Daniel Drotos wrote:
> On Mon, 29 May 2006, Tom Lane wrote:
>
> >If you could identify which file is which, you could manually
> >reconstruct the directories, but I'm afraid the odds of doing that
>
> Postgresql data files do not identifying themselves (in their content)
> so it's an ext2fs problem. I'm trying to solve it, just for fun, and
> to get experience how can it be done.

You could guess what some files are, particularly the system catalogs,
by searching for known contents (for example, if you see the string
"pg_class" and "pg_attribute" you could think it's the file for pg_class
itself). You could identify several system catalogs easily this way.
But for user tables it would be quite complicated. I'd use the number
of atts as a first clue (assuming you have already restored the system
catalogs).

I don't know how you intend to guess at telling the pg_clog files apart
though :-)

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Mitch Pirtle 2006-05-29 17:56:51 8.0 install via fink on OS X, now what?
Previous Message Daniel Drotos 2006-05-29 15:23:22 Re: recover of data directory