Re: Primary Key Index Bloat?

From: Sergey Konoplev <gray(dot)ru(at)gmail(dot)com>
To: David Johnston <polobo(at)yahoo(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Primary Key Index Bloat?
Date: 2013-11-19 02:09:22
Message-ID: CAL_0b1tpi5tQ6rgYRTbENW0JuPkEKDK8p34O7YRGneDPhw1b4A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Nov 17, 2013 at 10:48 PM, David Johnston <polobo(at)yahoo(dot)com> wrote:
> I am preparing to REINDEX the unique index and DROP the non-unique one over
> the same field - probably Tuesday evening. Does everything I am saying here
> sound kosher or would someone like me to provide additional information?

[...]

> I have mostly left VACUUMing to auto-vacuum though the occasional manual one
> has been performed. Never performed VACUUM FULL.

You can try pgcompact from PgToolkit [1]

pgcompact -d dbname -t tablename -r -v info

that will concurrently reindex those indexes that are bloated and will
remove bloat from the table without recreating it in the case if it is
bloated only. It might require pgstattuple extension [2] to be
installed [3] .

[1] https://github.com/grayhemp/pgtoolkit
[2] http://www.postgresql.org/docs/9.0/static/pgstattuple.html
[3] http://www.postgresql.org/docs/9.0/static/contrib.html

--
Kind regards,
Sergey Konoplev
PostgreSQL Consultant and DBA

http://www.linkedin.com/in/grayhemp
+1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979
gray(dot)ru(at)gmail(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message bricklen 2013-11-19 03:25:08 Re: ERROR: out of memory DETAIL: Failed on request of size ???
Previous Message Andrew Sullivan 2013-11-19 01:56:57 Re: Postgres as In-Memory Database?