Re: HOT patch, missing things

From: "Pavan Deolasee" <pavan(dot)deolasee(at)gmail(dot)com>
To: "Gregory Stark" <stark(at)enterprisedb(dot)com>
Cc: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>, "Simon Riggs" <simon(at)2ndquadrant(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-08 11:15:44
Message-ID: 2e78013d0708080415g5ea401c9u4d8e80a23c1e664a@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 8/8/07, Gregory Stark <stark(at)enterprisedb(dot)com> wrote:
>
>
>
> It seems that previously percentage of tuples made sense because dead
> tuples
> took about the same amount of space as new tuples that need that space.
> But
> line pointers take much less space than the new tuples so the number of
> dead
> line pointers we need before we can recover a useful amount of space
> depends
> on the ratio of line pointer size to tuple size.
>
> Perhaps we should be gathering "bytes of dead tuples" in pg_stat not just
> n_dead_tuples.
>
>

This is a good idea. Alternatively, we can guess percentage of dead space
using the average tuple size, number of dead tuples and number of reltuples.

Another thing to worry about is index bloats. Even though a redirect-dead
line pointer takes only 4 bytes in the heap, the associated dead space
in the index is as large as any other index tuple and the index
might be in a need for vacuum.

Thanks,
Pavan

--
Pavan Deolasee
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Brendan Jurd 2007-08-08 11:36:35 Function structure in formatting.c
Previous Message Gregory Stark 2007-08-08 10:24:13 Re: HOT patch, missing things