Skip site navigation (1) Skip section navigation (2)

Re: HOT - whats next ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Pavan Deolasee" <pavan(dot)deolasee(at)enterprisedb(dot)com>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: HOT - whats next ?
Date: 2007-03-02 15:08:19
Message-ID: 6203.1172848099@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
"Pavan Deolasee" <pavan(dot)deolasee(at)enterprisedb(dot)com> writes:
> - Another problem with the current HOT patch is that it generates
>   tuple level fragmentation while reusing LP_DELETEd items when
>   the new tuple is of smaller size than the original one. Heikki
>   supported using best-fit strategy to reduce the fragmentation
>   and thats worth trying. But ISTM that we can also correct
>   row-level defragmentation whenever we run out of free space
>   and LP_DELETEd tuples while doing UPDATE. Since this does not
>   require moving tuples around, we can do this by a simple EXCLUSIVE
>   lock on the page.

You are mistaken.  To move existing tuples requires
LockBufferForCleanup, the same as VACUUM needs; otherwise some other
backend might continue to access a tuple it found previously.

How much testing of this patch's concurrent behavior has been done?
I'm wondering if any other locking thinkos are in there ...

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2007-03-02 15:13:18
Subject: Re: UPSERT
Previous:From: Gregory StarkDate: 2007-03-02 15:06:52
Subject: Re: UPSERT

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group