Re: HOT is applied - Mailing list pgsql-hackers

From Pavan Deolasee
Subject Re: HOT is applied
Date
Msg-id 2e78013d0709210749y180c20dfg669cb00bcf46d512@mail.gmail.com
Whole thread Raw
In response to Re: HOT is applied  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers


On 9/21/07, Tom Lane <tgl@sss.pgh.pa.us> wrote:

It shouldn't, though --- the hint bit should get cleared on the first
try.  I think I probably broke something in the last round of revisions
to heap_page_prune_opt, but haven't looked yet ...


We set the hint bit (prunable) again when we see a RECENTLY_DEAD
or DELETE_IN_PROGRESS tuple. This is correct in normal circumstances
because otherwise we would never be able to prune the page.

On a second thought, may be we can choose not to set the bit again. In
the worst case, the next update on the page would be a COLD update.
That would set the bit again and we shall retry prune in the next visit to
the page.

This scheme would work as long as we don't put in mechanism to
update FSM after pruning. But if we choose to update FSM (I am
inclined to do this to avoid repeated relation extension because
of COLD updates), we would need to improve this. Otherwise a
page full of only DEAD tuples may never be pruned and vacuum
would be required to reclaim that space.

Thanks,
Pavan

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

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: HOT is applied
Next
From: "Heikki Linnakangas"
Date:
Subject: Re: HOT is applied