Re: What is an item pointer, anyway?

From: Ashwin Agrawal <aagrawal(at)pivotal(dot)io>
To: Peter Geoghegan <pg(at)bowt(dot)ie>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: What is an item pointer, anyway?
Date: 2019-04-26 23:23:44
Message-ID: CALfoeivDtaQPn8tfb48q1LJ1m1g6AKsgZ5Ws7OQZFBDHOUjnDQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Apr 26, 2019 at 2:19 PM Peter Geoghegan <pg(at)bowt(dot)ie> wrote:

> itemid.h introduces the struct ItemIdData as follows:
>
> /*
> * An item pointer (also called line pointer) on a buffer page
>
> Meanwhile, itemptr.h introduces the struct ItemPointerData as follows:
>
> /*
> * ItemPointer:
> *
> * This is a pointer to an item within a disk page of a known file
> * (for example, a cross-link from an index to its parent table).
>
> It doesn't seem reasonable to assume that you should know the
> difference based on context. The two concepts are closely related. An
> ItemPointerData points to a block, as well as the, uh, item pointer
> within that block.
>
> This ambiguity is avoidable, and should be avoided.

Agree.

> ISTM that the
> least confusing way of removing the ambiguity would be to no longer
> refer to ItemIds as item pointers, without changing anything else.
>

How about we rename ItemPointerData to TupleIdentifier or ItemIdentifier
instead and leave ItemPointer or Item confined to AM term, where item can
be tuple, datum or anything else ?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2019-04-26 23:49:14 Re: Optimizer items in the release notes
Previous Message Tom Lane 2019-04-26 21:57:17 pgsql: Update time zone data files to tzdata release 2019a.