From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Matthew Rantala <mjrantal(at)umn(dot)edu> |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: How to find calculated CRC checksum of pg_controldata |
Date: | 2014-04-09 16:44:55 |
Message-ID: | 20140409164455.GC8686@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On Thu, Apr 3, 2014 at 08:58:26AM -0500, Matthew Rantala wrote:
> Hello,
>
> Question: Is there a way to obtain the calculated CRC checksum for
> pg_controldata from the command line?
>
> I'm asking this because we had our database get wiped out, and for a
> variety of reasons, did not have a clean backup of the data
> directory. I did, however, have a complete set of WAL files for the
> database from the origin of the instance's life. I was able to use
> these to restore the database into a new database that I engineered
> look like a copy of the original by editing the pg_control file (and
> first log file) by changing the Database system identifier and the
> CRC checksum.
>
> Finding the correct CRC checksum, however, was a pain. I downloaded
> the code and modified pg_controldata.exe so it would display the
> file CRC and calculated checksums so I would know what the correct
> value was.
>
> I'm in the process of documenting what I did and it would make the
> whole process much easier if there is a way to determine the CRC
> checksum without having to dig into the source code. I am currently
> using 9.2.6.
>
> Thanks for any info,
>
> Matt, who was extremely lucky that I initiated WAL logging at the
> very beginning.
Did you try pg_resetxlog? That should set the checksum properly.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ Everyone has their own god. +
From | Date | Subject | |
---|---|---|---|
Next Message | Martín Marqués | 2014-04-10 12:30:28 | Re: Postgresql 9.3 en cluster |
Previous Message | RAMAKRISHNAN KANDASAMY | 2014-04-09 13:30:01 | Default UID for postgres user in linux |