Re: auto vacuum, not working?

From: Greg Smith <greg(at)2ndQuadrant(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: auto vacuum, not working?
Date: 2012-01-15 12:09:50
Message-ID: 4F12C20E.7080400@2ndQuadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 01/13/2012 07:08 AM, Anibal David Acosta wrote:
>
> How can I release the space used by deleted rows? Without block the table.
>
>

The database can only reduce the size tables by returning space to the
operating system in one situation: there is free space at the very end
of the table. In that case, if it's possible to get a brief exclusive
lock on the table, it can shrink in size.

There are some programs available that reorganize table for goals like
this, without having any long-lasting locks on the tables. pg_reorg is
the most popular example: http://pgfoundry.org/projects/reorg/

--
Greg Smith 2ndQuadrant US greg(at)2ndQuadrant(dot)com Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.com

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Greg Smith 2012-01-16 22:35:53 Re: wal_level=archive gives better performance than minimal - why?
Previous Message Josh Berkus 2012-01-13 19:08:18 Re: Discovering the most searched values for a field