Re: recover from base directory? - Mailing list pgsql-general

From Tom Lane
Subject Re: recover from base directory?
Date
Msg-id 13896.1144180696@sss.pgh.pa.us
Whole thread Raw
In response to Re: recover from base directory?  ("patrick" <patrick@11h11.com>)
List pgsql-general
"patrick" <patrick@11h11.com> writes:
> some update... but still not working. so to resume i have base / pg_xlog (2
> files and archives dir.) / pg_clog - BUT no global. i reinstalled postgresql
> 8.0.4 (same version of my backup data/). initdb, createdb mydb1, mydb2 mydb3
> and move pg_xlog and _clog over the data. rename my base to fit the oid.

> starting postmaster is working fine, but i had to do a pg_resetxlog and now
> it start like normal. but the problem is when i pgsql mydb1 \d no relations
> founds...

You probably need to do a pg_resetxlog to move the transaction ID
counter up to where it was before.  Too bad you didn't find the old
global directory --- the pg_control file would have been good to reuse.
In its absence, look at the pg_resetxlog manual page concerning how to
determine a reasonable XID setting from the pg_clog file names.

            regards, tom lane

pgsql-general by date:

Previous
From: MargaretGillon@chromalloy.com
Date:
Subject: Fw: PostgreSQL support on Redhat Advance Server 2.1
Next
From: "patrick"
Date:
Subject: Re: recover from base directory?