Lee Duynslager <lee.duynsla...@gmail.com> writes:
> Hi I am trying to recover a postgres database from a ext3 partition
> that the filesystem has become corrupt and lost files.  Can anybody
> tell me what are the file signatures for the files that comprise a
> postgres database?

Look at PageHeaderIsValid in bufpage.c.  Those tests are pretty weak if
only applied once, but if you got matches on the first ten or twenty 8K
pages of a file, you could probably conclude it was a PG file with high
confidence.

                        regards, tom lane

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to