From: | "Alok K(dot) Dhir" <alok(at)dhir(dot)net> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Please help recover data - lost pg_control |
Date: | 2001-07-03 15:01:39 |
Message-ID: | 000a01c103d1$1014c790$1e01a8c0@dhir.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hey all - my pg_control file got hosed somehow on a 7.1b3 installation.
All my data files other than pg_control are intact. A search of the net
reveals that the pg_resetxlog utility can be helpful in this situation.
However, my installation does not have the pg_resetxlog utility in the
contrib directory.
So, I grabbed the 7.1.2 sources, built the utility in the contrib
directory, and ran it. It seemed to run fine, but when I start
postmaster now, I get:
[vici:/usr/local/pgsql] postmaster
FATAL 2: Invalid CRC in control file
Next, I built and installed 7.1.2 over my 7.1b3 (I still have the 7.1b3
sources just in case). Now postmaster seems to start fine. But when I
try to do a pg_dumpall, I get:
[root(at)vici:/usr/local/pgsql] pg_dumpall
--
-- pg_dumpall (7.1.2)
--
\connect template1
DELETE FROM pg_shadow WHERE usesysid <> (SELECT datdba FROM
pg_database WHERE datname = 'template0');
ERROR: readDatum: ']' expected, length = 12
DELETE FROM pg_group;
--
-- Database template1
--
\connect template1 postgres
\connect template1 postgres
getDatabase(): SELECT failed. Explanation from backend: 'ERROR:
readDatum: ']' expected, length = 12
'.
pg_dump failed on template1, exiting
When I run 'psql demo' at this point, I can issue commands like 'select
* from person' and it gives me the header with the list of columns, but
no data (0 rows). Attempting to describe a table results in an error
much like the above.
Seems to me the pg_resetxlog utility does not generate a pg_control file
compatible with the 7.1b3 data file format, thus the CRC errors. It
further appears that 7.1.2 is expecting a different format as well.
I know all the data is there - it must be possible to extract it
/somehow/.
I would be _extremely_ grateful for any assistance.
Thanks in advance.
Alok
From | Date | Subject | |
---|---|---|---|
Next Message | Hervé Piedvache | 2001-07-03 15:07:19 | [PGSQL/PHP] Trouble: pq_recvbuf: unexpected EOF on client connection |
Previous Message | Philip Molter | 2001-07-03 14:51:21 | Re: Determining scan types |