Thread: Diagnose Database Corruption

Diagnose Database Corruption

From
Alex.H.Pollock@WellsFargo.COM
Date:
Does PostgreSQL have a tool to diagnose and fix database corruption?  Is
there any kind of database consistency checker?  I couldn't find anything in
the doc...

Thanks!

Alex Pollock
WFSC Data Services District
Database Administration
MAC A0186-032
( 415) 243-5931



Re: Diagnose Database Corruption

From
Bruce Momjian
Date:
We don't have a checker because if it is corrupt, it will mention
something in the server logs or correct it automatically.  Corruption is
very rare, usually hardware flakiness.

---------------------------------------------------------------------------

Alex.H.Pollock@WellsFargo.COM wrote:
> Does PostgreSQL have a tool to diagnose and fix database corruption?  Is
> there any kind of database consistency checker?  I couldn't find anything in
> the doc...
>
> Thanks!
>
> Alex Pollock
> WFSC Data Services District
> Database Administration
> MAC A0186-032
> ( 415) 243-5931
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Re: Diagnose Database Corruption

From
"Mendola Gaetano"
Date:
"Bruce Momjian" <pgman@candle.pha.pa.us> wrote:
> We don't have a checker because if it is corrupt, it will mention
> something in the server logs or correct it automatically.  Corruption is
> very rare, usually hardware flakiness.

I agree about the fact that corruption is very rare but sometimes I got
a "duplicate primary key" and the only solution was dump the DB,
edit the dump and restore the DB.
If the dump is uge ( like 400 MB ) is a lot of down time :-(
The problem disappeared after removing the reindex on that table
scheduled each morning.

Regards
Gaetano Mendola.