From: Alvaro Herrera <alvherre@commandprompt.com>
To: Daniel Drotos <drdani@mazsola.iit.uni-miskolc.hu>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-admin@postgresql.org
Subject: Re: recover of data directory
Date: Mon, 29 May 2006 11:28:15 -0400
Message-ID: <20060529152814.GF22206@surnet.cl> (raw)
In-Reply-To: <Pine.LNX.4.61.0605291717400.3307@mazsola.iit.uni-miskolc.hu>
References: <20060510080835.C087C9F931D@postgresql.org>
<Pine.LNX.4.61.0605291203100.26742@mazsola.iit.uni-miskolc.hu>
<14037.1148914696@sss.pgh.pa.us>
<Pine.LNX.4.61.0605291717400.3307@mazsola.iit.uni-miskolc.hu>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: alvherre@commandprompt.com, drdani@mazsola.iit.uni-miskolc.hu, tgl@sss.pgh.pa.us
Subject: Re: recover of data directory
In-Reply-To: <20060529152814.GF22206@surnet.cl>
References: <20060510080835.C087C9F931D@postgresql.org> <Pine.LNX.4.61.0605291203100.26742@mazsola.iit.uni-miskolc.hu> <14037.1148914696@sss.pgh.pa.us> <Pine.LNX.4.61.0605291717400.3307@mazsola.iit.uni-miskolc.hu> <20060529152814.GF22206@surnet.cl>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox