From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Heap WARM Tuples - Design Draft |
Date: | 2016-08-04 17:16:35 |
Message-ID: | 20160804171635.GN1702@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Aug 4, 2016 at 09:58:29AM -0700, Andres Freund wrote:
> On 2016-08-04 12:55:25 -0400, Bruce Momjian wrote:
> > On Thu, Aug 4, 2016 at 09:31:18AM -0700, Andres Freund wrote:
> > > Hi,
> > >
> > > On 2016-08-04 16:29:09 +0530, Pavan Deolasee wrote:
> > > > Indexes whose values do not change do not require new index pointers. Only
> > > > the index whose key is being changed will need a new index entry. The new
> > > > index entry will be set to the CTID of the root line pointer.
> > >
> > > That seems to require tracing all hot-chains in a page, to actually
> > > figure out what the root line pointer of a warm-updated HOT tuple is,
> > > provided it's HOT_UPDATED itself. Or have you found a smart way to
> > > figure that out?
> >
> > The index points to the head of the HOT chain, and you just walk the
> > chain on the page --- on need to look at other chains on the page.
>
> When doing an update, you'll need to re-find the root tuple, to insert
> the root ctid for the new index tuples.
Also, I was thinking we could just point into the middle of the HOT
chain to limit the number of rows we have to check, but the problem
there is that HOT pruning could then not remove that middle ctid, which
is bad.
I wonder if walking all HOT chains on a single page to find the root is
cheap enough. The ctid tells you if it is part of a HOT chain, right?
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2016-08-04 17:17:28 | Re: Heap WARM Tuples - Design Draft |
Previous Message | Simon Riggs | 2016-08-04 17:16:02 | Re: Heap WARM Tuples - Design Draft |