Re: Heap WARM Tuples - Design Draft

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Heap WARM Tuples - Design Draft
Date: 2016-08-04 17:54:04
Message-ID: 20160804175404.GS1702@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Aug 4, 2016 at 01:05:53PM -0400, Bruce Momjian wrote:
> > Approach 2 seems more reasonable and simple. 
> >
> > There are only 2 bits for lp_flags and all combinations are already used. But
> > for LP_REDIRECT root line pointer, we could use the lp_len field to store this
> > special flag, which is not used for LP_REDIRECT line pointers. So we are able
> > to mark the root line pointer.
>
> Uh, as I understand it, we only use LP_REDIRECT when we have _removed_
> the tuple that the ctid was pointing to, but it seems you would need to
> set HEAP_RECHECK_REQUIRED earlier than that.
>
> Also, what is currently in the lp_len field for LP_REDIRECT? Zeros, or
> random data? I am asking for pg_upgrade purposes.

It seems LP_REDIRECT's lp_len is always zero: :-)

/*
* ItemIdSetRedirect
* Set the item identifier to be REDIRECT, with the specified link.
* Beware of multiple evaluations of itemId!
*/
#define ItemIdSetRedirect(itemId, link) \
( \
(itemId)->lp_flags = LP_REDIRECT, \
(itemId)->lp_off = (link), \
(itemId)->lp_len = 0 \
^^^^^^^^^^
)

--
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 +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-08-04 18:07:30 Re: [RFC] Change the default of update_process_title to off
Previous Message Andres Freund 2016-08-04 17:53:03 Re: Pgbench performance tuning?