Skip site navigation (1) Skip section navigation (2)

Re: Corrupted Table

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Bryan White" <bryan(at)arcamax(dot)com>
Cc: "pgsql-general" <pgsql-general(at)postgreSQL(dot)org>
Subject: Re: Corrupted Table
Date: 2000-07-31 20:27:44
Message-ID: 12951.965075264@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-general
"Bryan White" <bryan(at)arcamax(dot)com> writes:
> I am wiling to spend some time to track this down.  However I would prefer
> to not keep crashing my live database.  I would like to copy the raw data
> files to a backup maching.  Are there any catches in doing this.

Shut down the postmaster and then copy the entire db (including pg_log
file) and it should work.  The catch is to make sure pg_log is in sync
with your table files.

> How hard would it be to write a utility that would walk a table looking this
> kind of corruption?  Are the on-disk data formats documented anywhere?

I don't think there's a single handy-dandy reference, although you can
learn a lot from the header files in src/include/storage/.

Not sure about the value of a utility like that --- seems like it'd
always be prepared to fight the last war rather than the next one,
since anything we learned about likely failure patterns would probably
get folded into the main code.  But if you feel like working on one,
far be it from me to stop you...

			regards, tom lane

In response to

Responses

pgsql-general by date

Next:From: Bryan WhiteDate: 2000-07-31 21:37:19
Subject: Re: Corrupted Table
Previous:From: Bryan WhiteDate: 2000-07-31 20:12:56
Subject: Re: Corrupted Table

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group