Re: HOT is applied

From: "Pavan Deolasee" <pavan(dot)deolasee(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: HOT is applied
Date: 2007-09-21 17:46:17
Message-ID: 2e78013d0709211046t1001ccdcx23374eeadcb81ccb@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 9/21/07, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
>
>
> I'm also starting to come around to liking the page-header-xid field
> a bit more. I suggest that it could replace the "page is prunable"
> flag bit altogether --- to mark the page prunable, you must store
> some appropriate xid into the header field. This would avoid a useless
> prune attempt immediately after a page is marked prunable.
>
>
Agree. I was thinking of minimum of the following:

1 xmin of INSERT_IN_PROGRESS tuple
2 xmax of DELETE_IN_PROGRESS tuple
3 xmax of RECENTLY_DEAD_TUPLE

When we attempt a prune, we can set xid to the minimum of the above
three. If none of the above tuples exist in the page, xid can be set to
FrozenXid
A page need not be pruned if its xid is set to FrozenXid or is greater
than OldtestXmin.

In addition, I guess we can even set the xid also when we insert,
delete or update from the page unless its already set to a lower value.

Thanks,
Pavan

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-09-21 18:29:05 Re: HOT is applied
Previous Message Gregory Stark 2007-09-21 17:41:08 Re: like/ilike improvements