Index space growing even after cleanup via autovacuum in Postgres 9.2

From: Tirthankar Barari <tbarari(at)verizon(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Index space growing even after cleanup via autovacuum in Postgres 9.2
Date: 2014-01-09 18:50:45
Message-ID: 52CEEF85.3080605@terremark.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

We have a table where we insert about 10 million rows everyday. We keep
14 day's worth of entries (i.e. 140 mil). A scheduled task wakes up
every day and deletes all entries past the 14 day window (i.e. deletes
entries from the 15th day in the past).

We have autovacuum set to trigger when 1% of rows are deleted and that
is running fine consistently.

However, we are noticing that after autovacuum, our disk space
consumption is still increasing and the increase is in the index size
(by querying pg_total_relation_size("mytable") and
pg_indexes_size("mytable")).

In Postgres 9.2.2, doesn't autovacuum cleanup dead indexes and reuse
that space too? So, why do we see this not happening?

Thanks

- tirthankar

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Nelson Green 2014-01-09 18:55:35 Re: Last inserted row id with complex PK
Previous Message Panneerselvam Posangu 2014-01-09 17:03:42 SQL State XX000 : XML namespace issue