X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 52402D1B267 for ; Thu, 24 Jun 2004 13:33:50 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 64842-10 for ; Thu, 24 Jun 2004 16:33:45 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 0336ED1B262 for ; Thu, 24 Jun 2004 13:33:44 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i5OGXgGs015231; Thu, 24 Jun 2004 12:33:42 -0400 (EDT) To: "Shea,Dan [CIS]" Cc: pgsql-performance@postgresql.org Subject: Re: after using pg_resetxlog, db lost In-reply-to: <644D07D3D59D8F408CD01AC2F833D8C62B9217@cisxa.cmc.int.ec.gc.ca> References: <644D07D3D59D8F408CD01AC2F833D8C62B9217@cisxa.cmc.int.ec.gc.ca> Comments: In-reply-to "Shea,Dan [CIS]" message dated "Thu, 24 Jun 2004 12:14:54 -0400" Date: Thu, 24 Jun 2004 12:33:41 -0400 Message-ID: <15230.1088094821@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/252 X-Sequence-Number: 7310 "Shea,Dan [CIS]" writes: > I determined the largest was 12,293,162 and set it to > pg_resetxlog -x 15000000 /var/lib/pgsql/data Okay, but it looks like you will also need to adjust pg_clog to cover that transaction ID range. (I had thought pg_resetxlog would handle this for you, but it looks like not.) > Jun 24 15:02:05 murphy postgres[28061]: [11-1] PANIC: could not access status of transaction 15000030 > Jun 24 15:02:05 murphy postgres[28061]: [11-2] DETAIL: could not read from file "/var/lib/pgsql/data/pg_clog/000E" at offset 73728: Success You need to append zeroes (8K at a time) to /var/lib/pgsql/data/pg_clog/000E until it's longer than 73728 bytes. I'd use something like dd bs=8k count=1 >/var/lib/pgsql/data/pg_clog/000E assuming that your system has /dev/zero. regards, tom lane