Re: [GENERAL] unique index corruption

2013-07-24 Thread Sergey Konoplev
On Wed, Jul 24, 2013 at 11:50 AM, pg noob wrote: > In PostgreSQL 8.4... > > I am wondering if autovacuum will periodically rebuild indexes? It doesn't rebuild indexes, it marks empty index pages for reuse. > If not, how advisable is it to reindex periodically? Here described the recommendations

Re: [GENERAL] unique index corruption

2013-07-24 Thread Merlin Moncure
On Wed, Jul 24, 2013 at 1:50 PM, pg noob wrote: > > Hi all, > > In PostgreSQL 8.4... > > I am wondering if autovacuum will periodically rebuild indexes? it will not. REINDEX requires a heavy lock and for most applications it would be just plain untenable to be run without some type of application

[GENERAL] unique index corruption

2013-07-24 Thread pg noob
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