pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Daniele Varrazzo <daniele.varrazzo@gmail.com>
To: Jesper Krogh <jesper@krogh.cc>
Cc: pgsql-performance@postgresql.org
Subject: Re: Best practice when reindexing in production
Date: Wed, 29 May 2013 18:25:21 +0100
Message-ID: <1369848321.28819.31.camel@risotto.smithersbet.com> (raw)
In-Reply-To: <51A63717.7070301@krogh.cc>
References: <5359686B-FAE8-4056-AF13-F9FD6919FE82@autouncle.com>
	<51A63717.7070301@krogh.cc>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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



-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



view thread (15+ messages)  latest in thread

Message-ID: <1369848321.28819.31.camel@risotto.smithersbet.com>
Permalink:  ../1369848321.28819.31.camel@risotto.smithersbet.com/
Also on:    postgresql.org/message-id/1369848321.28819.31.camel@risotto.smithersbet.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: daniele.varrazzo@gmail.com, jesper@krogh.cc
  Subject: Re: Best practice when reindexing in production
  In-Reply-To: <1369848321.28819.31.camel@risotto.smithersbet.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox