Re: Table bloat and vacuum - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Table bloat and vacuum
Date
Msg-id 20081112151923.GF4535@alvh.no-ip.org
Whole thread Raw
In response to Table bloat and vacuum  (Jack Orenstein <jack.orenstein@hds.com>)
List 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.

pgsql-general by date:

Previous
From: Jack Orenstein
Date:
Subject: Table bloat and vacuum
Next
From: "Sergey Konoplev"
Date:
Subject: Re: Very slow queries w/ NOT IN preparation (seems like a bug, test case)