pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Matthew Rantala <mjrantal@umn.edu>
To: pgsql-admin@postgresql.org
Subject: How to find calculated CRC checksum of pg_controldata
Date: Thu, 03 Apr 2014 08:58:26 -0500
Message-ID: <533D6902.9080300@umn.edu> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

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.

-- 

Matthew J Rantala, GISP
Minnesota Geological Survey
University of Minnesota
2642 University Ave.
St. Paul, MN 55114-1057
(612) 627-4780 x206



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



view thread (3+ messages)  latest in thread

Message-ID: <533D6902.9080300@umn.edu>
Permalink:  ../533D6902.9080300@umn.edu/
Also on:    postgresql.org/message-id/533D6902.9080300@umn.edu

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: mjrantal@umn.edu
  Subject: Re: How to find calculated CRC checksum of pg_controldata
  In-Reply-To: <533D6902.9080300@umn.edu>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox