Re: HOT patch, missing things

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Pavan Deolasee" <pavan(dot)deolasee(at)gmail(dot)com>, "Simon Riggs" <simon(at)2ndquadrant(dot)com>, "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>, "Pavan Deolasee" <pavan(at)enterprisedb(dot)com>, "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: HOT patch, missing things
Date: 2007-08-14 14:30:41
Message-ID: 87absu6ve6.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> "Pavan Deolasee" <pavan(dot)deolasee(at)gmail(dot)com> writes:
>> What if we just track the amount of potentially dead space in the
>> relation
>> (somebody had suggested that earlier in the thread) ? Every committed
>> UPDATE/DELETE and aborted UPDATE/INSERT would increment
>> the dead space. Whenever page fragmentation is repaired, either during
>> normal operation or during vacuum, the dead space is reduced by the
>> amount of reclaimed space. Autovacuum triggers whenever the percentage
>> of dead space increases beyond a threshold.
>
> Doesn't this design completely fail to take index bloat into account?
> Repairing heap fragmentation does not reduce the need for VACUUM to work
> on the indexes.

Index bloat is a bit of an open issue already. Because page splits already
prune any LP_DELETEd pointers any busy index keys will be pruned already.

However any index keys which have not been the subject of an index lookup --
and that includes keys which are only accessed by bitmap-index-scans -- won't
be pruned.

So we don't really know how much bloat is currently in an index. Perhaps we
need a new statistic which gets updated whenever a page split prunes
LP_DELETEd pointers (or perhaps when LP_DELETE is set?).

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2007-08-14 14:34:59 Re: HOT patch, missing things
Previous Message Tom Lane 2007-08-14 14:26:24 Re: Question about change in page/tuple header (v4)