pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John Lister <john.lister-ps@kickstone.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Database corruption help
Date: Fri, 13 Feb 2009 17:57:11 +0000
Message-ID: <4995B477.7090805@kickstone.com> (raw)
In-Reply-To: <3304.1234542508@sss.pgh.pa.us>
References: <507152DDF8AB4DF093BD01A8BEC7C659@squarepi.com>
	<17205.1234200693@sss.pgh.pa.us>
	<AB15E89CD7FB4EBD9D76CC5F8D8B3D4E@squarepi.com>
	<4990840C.4090900@kickstone.com>
	<20151.1234208044@sss.pgh.pa.us>
	<49908D72.7040904@kickstone.com>
	<25753.1234224090@sss.pgh.pa.us>
	<4991338B.704@kickstone.com>
	<4994906B.6090408@kickstone.com>
	<17204.1234474784@sss.pgh.pa.us>
	<4994987F.1030204@kickstone.com>
	<17764.1234476783@sss.pgh.pa.us>
	<4994A45B.4030707@kickstone.com>
	<49952D33.3000707@kickstone.com>
	<3304.1234542508@sss.pgh.pa.us>

Cheers, i'll give it ago. I'm probably going to do a full restore over 
the weekend while i can shut things down without too many complaints...

I can save any of the files if you are interested in them later on...

JOHN

Tom Lane wrote:
> John Lister <john.lister-ps@kickstone.com> writes:
>   
>> Any help would be appreciated as the pg_class table is constantly 
>> growing which i'm guessing is going to start to affect performance 
>> fairly soon. I'd like to avoid a full restore from backup if possible.
>>     
>
> BTW, what I would recommend as a recovery action is to zero out that
> page of pg_class while the postmaster is stopped.  We know that none
> of those rows are useful to you, and there shouldn't be any index
> entries pointing at them (since they're all HOT tuples), so at least
> in theory that won't cause any damage.  Then you can try another
> VACUUM FULL and see if there are any more pages with, er, issues.
>
> If you're on a machine that has /dev/zero then something like this
> should work:
>
> dd bs=8k count=1 seek=15538 conv=notrunc if=/dev/zero of=$PGDATA/base/16392/1259
>
> but it'd be a good idea to save a copy of the target file so you can try
> again if you mess up.
>
> Also, it'd really be prudent to do a dump, initdb, reload once you
> get to a point where pg_dump succeeds without complaints.  We don't
> have any good way to know what other corruption might be lurking
> undetected.
>
> 			regards, tom lane
>   



view thread (19+ messages)  latest in thread

Message-ID: <4995B477.7090805@kickstone.com>
Permalink:  ../4995B477.7090805@kickstone.com/
Also on:    postgresql.org/message-id/4995B477.7090805@kickstone.com

 · 

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: john.lister-ps@kickstone.com, tgl@sss.pgh.pa.us, pgsql-hackers@postgresql.org
  Subject: Re: Database corruption help
  In-Reply-To: <4995B477.7090805@kickstone.com>

* 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