Re: pg_autovacuum: short, wide tables - Mailing list pgsql-bugs

From Tom Lane
Subject Re: pg_autovacuum: short, wide tables
Date
Msg-id 24101.1120841848@sss.pgh.pa.us
Whole thread Raw
In response to pg_autovacuum: short, wide tables  (mark reid <mail@markreid.org>)
Responses Re: pg_autovacuum: short, wide tables  (Jan Wieck <JanWieck@Yahoo.com>)
List pgsql-bugs
Mark Reid <mail@markreid.org> writes:
> I think the issue is that a single update to the main table causes a
> whole bunch of updates to the toast table.  So in my case (with the
> vacuum output attached previously), a thousand updates to the main table
> entails tens of thousands of updates to the toast table.

Exactly.  If autovac were looking at the properties of the toast table
it would think a vacuum pass was warranted sooner than it thinks from
just looking at the main table.

Admittedly this doesn't come into play unless you have a fairly large
number of toast chunks per main-table row, so the rows in question have
to be really wide (dozens of KB even after compression) before it gets
to be a big deal.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: pg_autovacuum: short, wide tables
Next
From: Tom Lane
Date:
Subject: Re: pg_autovacuum: short, wide tables