Re: HOT WIP Patch - version 1 - Mailing list pgsql-hackers

From mark@mark.mielke.cc
Subject Re: HOT WIP Patch - version 1
Date
Msg-id 20070214192137.GA14203@mark.mielke.cc
Whole thread Raw
In response to Re: HOT WIP Patch - version 1  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
On Wed, Feb 14, 2007 at 01:56:03PM -0500, Bruce Momjian wrote:
> Could we insert index tuples for the live tuple and then remove the root
> tuple, perhaps later?  So basically we break the chain at that time. 
> The problem there is that we basically have nothing better than what we
> have now --- we are just delaying the index insert, and I don't see what
> that buys us.

At some point - inserting into the block would not be possible, as
there is no free space. Would that be a good time to do the index
insert? Then, a later vacuum would eventually prune out the whole old
chain. As long as vacuuming the intermediate entries in the chain
keeps the block with free space, there is no need to remove the root
tuple. If space ever runs out (vacuum not running frequently enough -
many updates performed in the same interval) - fall back to the
mechanism that is being used today.

I see it buying increased performance for rows that are frequently
updated.  If it can delay modifying the indices to only once every 10
or more updates, it seems to me that the improvement should be
significant. Perhaps PostgreSQL could be used for page hit counters
again... :-)

Cheers,
mark

-- 
mark@mielke.cc / markm@ncf.ca / markm@nortel.com     __________________________
.  .  _  ._  . .   .__    .  . ._. .__ .   . . .__  | Neighbourhood Coder
|\/| |_| |_| |/    |_     |\/|  |  |_  |   |/  |_   | 
|  | | | | \ | \   |__ .  |  | .|. |__ |__ | \ |__  | Ottawa, Ontario, Canada
 One ring to rule them all, one ring to find them, one ring to bring them all                      and in the darkness
bindthem...
 
                          http://mark.mielke.cc/



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Plan for compressed varlena headers
Next
From: Tom Lane
Date:
Subject: Re: "anyelement2" pseudotype