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 <[email protected]> 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 +
--
Sent via pgsql-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers