Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 0EC6E2E301A for ; Wed, 2 Jan 2008 13:39:07 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 12137-04 for ; Wed, 2 Jan 2008 13:39:03 -0400 (AST) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 8132E2E2F8F for ; Wed, 2 Jan 2008 13:39:04 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id m02Hd3Kn017138; Wed, 2 Jan 2008 12:39:03 -0500 (EST) To: Bernhard D Rohrer cc: pgsql-admin@postgresql.org Subject: Re: pg recovery In-reply-to: <477B5D58.2010409@sm-wg.net> References: <4778D3AC.7080108@sm-wg.net> <6006.1199115273@sss.pgh.pa.us> <477B5D58.2010409@sm-wg.net> Comments: In-reply-to Bernhard D Rohrer message dated "Wed, 02 Jan 2008 09:46:00 +0000" Date: Wed, 02 Jan 2008 12:39:03 -0500 Message-ID: <17137.1199295543@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/24 X-Sequence-Number: 27798 Bernhard D Rohrer writes: > Tom Lane wrote: >> I think you've got a cross-version problem, as in the database is really >> PG 8.0 or earlier but you're trying to run 8.1 against it. What is in >> the PG_VERSION file? Have you done "pg_resetxlog -f", and if so do you >> have the original pg_control file to put back? > as for the versions see for yourself: > root@collab:/home/adminlion# cat /var/lib/postgresql/8.1/main/PG_VERSION > 8.1 > root@collab:/home/adminlion# cat > /olddrive/var/lib/postgresql/8.1/main/PG_VERSION > 8.1 Hmmm ... but it sure looks like the values are offset a few fields from where they belong ... [ meditates awhile... ] Ah, I've sussed it: the pg_controldata output you showed can be explained exactly by the assumption that this copy of pg_controldata thinks time_t is 64 bits wide, where the pg_control file actually has 32-bit-wide time_t fields. That explains both the ridiculously large dates (quite impossible for 32-bit time_t's) and the offsetting of the following fields. So the short answer is probably that you're trying to use a 64-bit build of Postgres against a 32-bit database. You need to get a matching build. (We really need to stop using time_t in pg_control.h ...) regards, tom lane