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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-general by date

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