Re: Heap WARM Tuples - Design Draft - Mailing list pgsql-hackers

From Pavan Deolasee
Subject Re: Heap WARM Tuples - Design Draft
Date
Msg-id CABOikdOL0E9uF5_Z=OMJvU2SbzUSc+c8q5-mOip+33HsFWw9ag@mail.gmail.com
Whole thread Raw
In response to Re: Heap WARM Tuples - Design Draft  (Bruce Momjian <bruce@momjian.us>)
Responses Re: Heap WARM Tuples - Design Draft  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers


On Fri, Aug 5, 2016 at 11:26 PM, Bruce Momjian <bruce@momjian.us> wrote:
On Fri, Aug  5, 2016 at 02:43:37PM -0300, Claudio Freire wrote:
> But doing the WARM chain backtracking and checking for previous
> versions with appropriate keys should be enough to support this use
> case too, it just needs to be well optimized to avoid seriously
> impacting performance on the average case.

Yes, that was an idea I had to --- if the in-page HOT chain already has
the key, we know it is already in the index and we can skip the index
addition.


I just don't know how would you do that without delaying/not-doing HOT chain prune. As soon as root and intermediate HOT tuples are gone, all information is lost. You may delay that, but that will defeat the whole purpose. If chains are not pruned in-time, you may not find any free space in the page and end up doing a cold update anyways. But may be I am missing something and Claudio has a different idea.

Thanks,
Pavan

--
 Pavan Deolasee                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Refactoring of heapam code.
Next
From: Andres Freund
Date:
Subject: Re: truncate trigger for foreign data wrappers