Re: HOT and INSERT/DELETE

From: "Pavan Deolasee" <pavan(dot)deolasee(at)gmail(dot)com>
To: "Bruce Momjian" <bruce(at)momjian(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>, "Pavan Deolasee" <pavan(at)enterprisedb(dot)com>
Subject: Re: HOT and INSERT/DELETE
Date: 2007-08-09 06:13:18
Message-ID: 2e78013d0708082313m5496128vb044870fe7cd4f4@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 8/9/07, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>
> I was wondering about HOT behavior.
>
> Will an INSERT reuse rows no longer visible caused by an UPDATE or
> DELETE, or if an UPDATE will reuse rows expired by an invisible DELETE?
> It seems both of these would be possible and useful.

As the patch stands today, we don't take any pains to update the
FSM information after pruning and defraging the page. So FSM would
not consider the page for either INSERT or COLD UPDATE. Of course,
the page can still be used for INSERT if relation->rd_targetblock is
somehow set to this page.

OTOH UPDATE will always reuse the dead space of either expired
updated rows or deleted rows or even aborted rows.

Thanks,
Pavan

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2007-08-09 06:36:41 Re: default_text_search_config and expression indexes
Previous Message Oleg Bartunov 2007-08-09 05:53:58 Re: default_text_search_config and expression indexes