Re: Best practice when reindexing in production - Mailing list pgsql-performance

From Daniele Varrazzo
Subject Re: Best practice when reindexing in production
Date
Msg-id 1369848321.28819.31.camel@risotto.smithersbet.com
Whole thread Raw
In response to Re: Best practice when reindexing in production  (Jesper Krogh <jesper@krogh.cc>)
Responses Re: Best practice when reindexing in production
List pgsql-performance
On Wed, 2013-05-29 at 19:12 +0200, Jesper Krogh wrote:

> Second, if the new index is significantly smaller than the old on, I
> suggest that you try to crank up the autovacuum daemon instead of
> blindly dropping and creating indexes, this will help to mitigate the
> bloat you're seeing accumulating in above test.

In my experience vacuum/autovacuum just don't reclaim any space from the
indexes, which accumulate bloat indefinitely. I've tried to work around
that in so many ways: the show-stopper has been the impossibility to
drop FK indexes in a concurrent way, coupled with VALIDATE CONSTRAINT
not doing what advertised and taking an exclusive lock.

My solution has been to become pg_repack maintainer. YMMV. Just don't
expect vacuum to reduce the indexes size: it doesn't.


--
Daniele



pgsql-performance by date:

Previous
From: Jesper Krogh
Date:
Subject: Re: Best practice when reindexing in production
Next
From: Alan Hodgson
Date:
Subject: Re: Best practice when reindexing in production