Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WViAK-0008EZ-KT for pgsql-admin@arkaria.postgresql.org; Thu, 03 Apr 2014 13:58:48 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WViAJ-0006HC-LY for pgsql-admin@arkaria.postgresql.org; Thu, 03 Apr 2014 13:58:47 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WViAI-0006GN-GS for pgsql-admin@postgresql.org; Thu, 03 Apr 2014 13:58:46 +0000 Received: from vs-m.tc.umn.edu ([134.84.135.97]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WViAA-0003ex-Bu for pgsql-admin@postgresql.org; Thu, 03 Apr 2014 13:58:40 +0000 Received: from mail-ig0-f175.google.com (mail-ig0-f175.google.com [209.85.213.175]) by vs-m.tc.umn.edu (UMN smtpd) with ESMTP for ; Thu, 3 Apr 2014 08:58:34 -0500 (CDT) X-Umn-Remote-Mta: [N] mail-ig0-f175.google.com [209.85.213.175] #+LO+TS+TR X-Umn-Classification: local Received: by mail-ig0-f175.google.com with SMTP id ur14so7784133igb.8 for ; Thu, 03 Apr 2014 06:58:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:content-type:content-transfer-encoding; bh=bk7l0jdetZMUbqw7BMzgz5k83TC9JKrws5WJB2LZ/hk=; b=Z8gzAMspXhhZUXKHwqB7w3djlWmFoGdg6beyBDT0AkbtmaRvh0uZxPIlT26Cxy/871 Xot7tmFgeZYyxp9GeQftMn2eehNNpa1LFm565/JOhOr7Mec5Ao6Dv/eMYRYHY+DxHmNm YOtZCtRMpZWxtJbllKR3AwdQlyMABrWELO0hvmVFAcOFbB535CFzV/TANTqHD9h+DRyq sun5uKruUAuybUqrM9OwnUrxiuSkwhTyMhUdATlPS4KSojMuWrAxaS09v/mgkqr87az0 Uj7MimReurgiWJy/vBOoBHm+4H5U08NfKR9PMqVhJa2Y8R0Lvlcgrge/j/YIsTPDxk3i UmEw== X-Gm-Message-State: ALoCoQlIx6ciabLevxTchPRpGEPZtyJ6UxQ3G+bJHvzoIO3PGRjtTmTQvaJwcCYN5EQDFByWPdyFYRIgyPaBl/jsfGDV17g9/wok3+vDZey5Fhg8eS2pxW4DdujHXBmUA2OzlpGo+EOF X-Received: by 10.42.88.79 with SMTP id b15mr1763149icm.65.1396533509188; Thu, 03 Apr 2014 06:58:29 -0700 (PDT) X-Received: by 10.42.88.79 with SMTP id b15mr1763137icm.65.1396533509074; Thu, 03 Apr 2014 06:58:29 -0700 (PDT) Received: from [160.94.215.10] (x-160-94-215-10.mngs.umn.edu. [160.94.215.10]) by mx.google.com with ESMTPSA id ro10sm47554219igb.6.2014.04.03.06.58.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 03 Apr 2014 06:58:28 -0700 (PDT) Message-ID: <533D6902.9080300@umn.edu> Date: Thu, 03 Apr 2014 08:58:26 -0500 From: Matthew Rantala User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: How to find calculated CRC checksum of pg_controldata Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.1 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org 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