Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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:

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

In response to

pgsql-performance by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group