Re: Data corruption zero a file - help!! - Mailing list pgsql-general

From Tom Lane
Subject Re: Data corruption zero a file - help!!
Date
Msg-id 29260.1141952759@sss.pgh.pa.us
Whole thread Raw
In response to Re: Data corruption zero a file - help!!  (Noel Faux <noel.faux@med.monash.edu.au>)
List pgsql-general
Noel Faux <noel.faux@med.monash.edu.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

pgsql-general by date:

Previous
From: Jan de Visser
Date:
Subject: Re: posgresql server connection
Next
From: Michael Louie Loria
Date:
Subject: Run PostgreSQL with Administrator account in Windows