Re: database size grows (even after vacuum (full and analyze))....

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joao Miguel Ferreira <jmf(at)estg(dot)ipvc(dot)pt>
Cc: Bruno Wolff III <bruno(at)wolff(dot)to>, pgsql-novice(at)postgresql(dot)org
Subject: Re: database size grows (even after vacuum (full and analyze))....
Date: 2006-05-03 18:12:19
Message-ID: 17960.1146679939@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-novice

Joao Miguel Ferreira <jmf(at)estg(dot)ipvc(dot)pt> writes:
> On Wed, 2006-05-03 at 15:45, Bruno Wolff III wrote:
>> How often are you vacuuming the table?

> I wrote that on my original e-mail: I do a "VACUUM ANALYZE" every 30
> minutes and a "VACUUM FULL" every 2 hours.

That's not a good maintenance procedure. Just do the plain vacuums and
forget the VACUUM FULL. If the table row count is fairly stable then
plain vacuums are all you need. I suspect VACUUM FULL is making things
worse not better --- it'll compact the tables, but at the price of
bloating the indexes.

You might want to pay some attention to exactly where the space is
disappearing to --- which files are getting bigger?

If you find you are suffering from index bloat, a very occasional
REINDEX (maybe once a week or less) will fix that, but VACUUM FULL
won't help it at all. I wouldn't recommend doing this unless
proven necessary, however.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joao Miguel Ferreira 2006-05-03 18:19:47 Re: database size grows (even after vacuum (full and
Previous Message Joao Miguel Ferreira 2006-05-03 17:57:24 Re: database size grows (even after vacuum (full and analyze))....

Browse pgsql-novice by date

  From Date Subject
Next Message Joao Miguel Ferreira 2006-05-03 18:19:47 Re: database size grows (even after vacuum (full and
Previous Message Joao Miguel Ferreira 2006-05-03 17:57:24 Re: database size grows (even after vacuum (full and analyze))....