pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Shea,Dan [CIS] <Dan.Shea@ec.gc.ca>
Cc: pgsql-performance@postgresql.org
Subject: Re: after using pg_resetxlog, db lost
Date: Thu, 24 Jun 2004 12:33:41 -0400
Message-ID: <15230.1088094821@sss.pgh.pa.us> (raw)
In-Reply-To: <644D07D3D59D8F408CD01AC2F833D8C62B9217@cisxa.cmc.int.ec.gc.ca>
References: <644D07D3D59D8F408CD01AC2F833D8C62B9217@cisxa.cmc.int.ec.gc.ca>

"Shea,Dan [CIS]" <Dan.Shea@ec.gc.ca> 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 </dev/zero >>/var/lib/pgsql/data/pg_clog/000E
assuming that your system has /dev/zero.

			regards, tom lane



view thread (9+ messages)  latest in thread

Message-ID: <15230.1088094821@sss.pgh.pa.us>
Permalink:  ../15230.1088094821@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/15230.1088094821@sss.pgh.pa.us

 · 

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-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, Dan.Shea@ec.gc.ca
  Subject: Re: after using pg_resetxlog, db lost
  In-Reply-To: <15230.1088094821@sss.pgh.pa.us>

* 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