Re: Data corruption zero a file - help!!

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Noel Faux <noel(dot)faux(at)med(dot)monash(dot)edu(dot)au>
Cc: Michael Fuhr <mike(at)fuhr(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: Data corruption zero a file - help!!
Date: 2006-03-10 01:05:59
Message-ID: 29260.1141952759@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Noel Faux <noel(dot)faux(at)med(dot)monash(dot)edu(dot)au> writes:
> To clarify, when set on, every time it hits this error, postgres will
> rezero that block?

It'll only "re" zero if the page gets dropped from shared memory without
there having been any occasion to write it out. Otherwise, the first
write will clobber the bad data on disk and that's the end of it.

My suggestion to use either VACUUM or SELECT COUNT(*) failed to take
that behavior into account --- VACUUM *will* rewrite the page, but a
SELECT scan won't dirty the page. So you might consider a SELECT to see
how bad the situation is (how many bad pages) and then a VACUUM if you
want them cleaned up.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Joshua D. Drake 2006-03-10 02:26:20 Re: Run PostgreSQL with Administrator account in Windows
Previous Message Jan de Visser 2006-03-10 01:04:34 Re: posgresql server connection