Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: recover of data directory



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



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group