Re: Frequent Update Project: Design Overview ofHOTUpdates

From: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
To: "Hannu Krosing" <hannu(at)skype(dot)net>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Frequent Update Project: Design Overview ofHOTUpdates
Date: 2006-11-10 19:06:20
Message-ID: 1163185581.3634.880.camel@silverbirch.site
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 2006-11-10 at 20:38 +0200, Hannu Krosing wrote:
> Ühel kenal päeval, R, 2006-11-10 kell 12:19, kirjutas Simon Riggs:
> > On Thu, 2006-11-09 at 18:28 -0500, Tom Lane wrote:
>
> > > > HOT can only work in cases where a tuple does not modify one of the
> > > > columns defined in an index on the table, and when we do not alter the
> > > > row length of the tuple.
> > >
> > > Seems like "altering the row length" isn't the issue, it's just "is
> > > there room on the page for the new version". Again, a generous
> > > fillfactor would give you more flexibility.
> >
> > The copy-back operation can only work if the tuple fits in the same
> > space as the root tuple. If it doesn't you end up with a tuple
> > permanently in the overflow relation. That might not worry us, I guess.
> >
> > Also, my understanding was that an overwrite operation could not vary
> > the length of a tuple (at least according to code comments).
>
> But you can change the t_ctid pointer in the heap tuple to point to
> oldest visible tuple in overflow.
>
> What I did not understand very well, is how do you determine, which
> overflow tuples are safe to remove. Do you mark/remove them when doing
> the copyback ?

Yes, dead chain is marked as we walk it to the next visible tuple prior
to copyback. Thats done with an exclusive lock held on the root block.
Pavan can answer those details better than me, so I'll leave that to
him, but the copyback operation needs to be closely examined.

We hope to post the code by Tuesday. It's being cleaned now to remove
the remains of previous prototypes to allow it be reviewed without
confusion.

--
Simon Riggs
EnterpriseDB http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message NikhilS 2006-11-10 19:23:27 Re: Frequent Update Project: Design Overview of HOT Updates
Previous Message Hannu Krosing 2006-11-10 18:38:12 Re: Frequent Update Project: Design Overview of