Re: Open issues for HOT patch

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Open issues for HOT patch
Date: 2007-09-18 14:49:12
Message-ID: 200709181449.l8IEnCp02401@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > Tom Lane wrote:
> >> But then what happens when you want to update a second tuple on the same
> >> page? None of our existing plan types release and reacquire pin if they
> >> don't have to, and I really doubt that we want to give up that
> >> optimization.
>
> > You will prune when you lock the page and at that point unless you got
> > enough room for both tuples I doubt trying just before the second tuple
> > is going to help.
>
> No, you're missing the point completely. If the free space on the page
> is, say, 1.5x the average tuple size, the code *won't* prune, and then
> it will be stuck when it goes to do the second tuple update, because
> there is no chance to reconsider the prune/no-prune decision after some
> space is eaten by the first update.

My point is that if you only do this for INSERT/UPDATE, you can prune
when you have less than enough room for 3-4 tuples, and if you add the
xmin of the earliest prune xact you can prune even more aggressively.

--
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 Bruce Momjian 2007-09-18 15:05:20 Traveling to Russia
Previous Message Tom Lane 2007-09-18 14:46:34 Re: Raw device I/O for large objects