Re: Table bloat and vacuum

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Jack Orenstein <jack(dot)orenstein(at)hds(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Table bloat and vacuum
Date: 2008-11-12 15:19:23
Message-ID: 20081112151923.GF4535@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jack Orenstein wrote:

> 1) Why does the tiny table bloat during a vacuum? Is it because the
> scan of the huge table is run as a transaction, forcing maintenance of
> dead versions of the tiny table's one row?

Yes.

> 2) Why does the bloat resolve itself? We're not doing any full
> vacuums.

Probably the one live tuple bounces to the first page at some point and
then the rest of the pages are truncated by vacuum.

> We're in the process of upgrading to 8.3.4, so I'd appreciate any
> throughs on whether and how this behavior will change with the newer
> release.

In 8.3, vacuuming the big table will not delay dead tuple removal of the
small table.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Sergey Konoplev 2008-11-12 15:23:16 Re: Very slow queries w/ NOT IN preparation (seems like a bug, test case)
Previous Message Markus Wollny 2008-11-12 15:15:23 Suboptimal execution plan for simple query