unique index corruption - Mailing list pgsql-general

From pg noob
Subject unique index corruption
Date
Msg-id CAPNY-2WHrZzL6Y+a+Y3whA+4qZCObPOxiLN5KoQRiHT1-i9oxQ@mail.gmail.com
Whole thread Raw
Responses Re: unique index corruption
Re: unique index corruption
List pgsql-general

Hi all,

In PostgreSQL 8.4...

I am wondering if autovacuum will periodically rebuild indexes?

If not, how advisable is it to reindex periodically?

We recently had a case of unique index corruption which ended up allowing duplicate
primary key IDs to get inserted and caused widespread data model integrity havoc.

The system ran for several days before it was noticed.

After the problem was discovered we found that a reindex would fail because there were
duplicate ID values.

Our thought is that if we had a scheduled cron job that would periodically do a reindex this
corruption might have been caught sooner by detecting the reindex failure.

If a reindex is something that should be done frequently as part of regular maintenance
why isn't there a mode of autovacuum that does this automatically?  Or maybe there is and
I just don't know about it..?

Thank you.


pgsql-general by date:

Previous
From: Jeff Janes
Date:
Subject: Re: Why are stored procedures looked on so negatively?
Next
From: devonline
Date:
Subject: Tablespace on Postgrsql