Re: Rename dead_tuples to dead_items in vacuumlazy.c

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Peter Geoghegan <pg(at)bowt(dot)ie>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Rename dead_tuples to dead_items in vacuumlazy.c
Date: 2021-11-24 14:37:05
Message-ID: 202111241437.ut2ui4gs4jku@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2021-Nov-24, Robert Haas wrote:

> On Wed, Nov 24, 2021 at 7:48 AM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
> > I think it's more consistent if we change it to one side. I prefer
> > "dead items".
>
> I feel like "items" is quite a generic word, so I think I would prefer
> TIDs. But it's probably not a big deal.

Is there clarity on what each term means?

Since this patch only changes things that are specific to heap
vacuuming, it seems OK to rely the convention that "item" means "heap
item" (not just any generic item). However, I'm not sure that we fully
agree exactly what a heap item is. Maybe if we agree to a single non
ambiguous definition for each of those terms we can agree what
terminology to use.

It seems to me we have the following terms:

- tuple
- line pointer
- [heap] item
- TID

My mental model is that "tuple" (in the narrow context of heap vacuum)
is the variable-size on-disk representation of a row in a page; "line
pointer" is the fixed-size struct at the bottom of each page that
contains location, size and flags of a tuple: struct ItemIdData. The
TID is the address of a line pointer -- an ItemPointerData.

What is an item? Is an item the same as a line pointer? That seems
confusing. I think "item" means the tuple as a whole. In that light,
using the term TID for some of the things that the patch renames to
"item" seems more appropriate.

--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2021-11-24 14:40:47 Re: Post-CVE Wishlist
Previous Message John Naylor 2021-11-24 14:15:52 Re: Parallel vacuum workers prevent the oldest xmin from advancing