Re: HOT and INSERT/DELETE

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>
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:50:51
Message-ID: 200708090650.l796opK25172@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Pavan Deolasee wrote:
> 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.

Well, that is very good news.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavan Deolasee 2007-08-09 07:09:00 Re: HOT patch, missing things
Previous Message Pavan Deolasee 2007-08-09 06:47:12 Re: GUC for default heap fillfactor