Re: Rename dead_tuples to dead_items in vacuumlazy.c

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
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:45:56
Message-ID: CA+TgmoYAye7n9a_0i_Pr=WmHMNttYq5p96_nDmSP-MCq8rO1yg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Nov 24, 2021 at 9:37 AM Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
> 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.

Hmm. I think in my model an item and an item pointer and a line
pointer are all the same thing, but a TID is different. When I talk
about a TID, I mean the location of an item pointer, not its contents.
So a TID is what tells me that I want block 5 and the 4th slot in the
item pointer array. The item pointer tells me that the associate tuple
is at a certain position in the page and has a certain length.

--
Robert Haas
EDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Japin Li 2021-11-24 14:49:01 Minor documentation fix - missing blank space
Previous Message Robert Haas 2021-11-24 14:40:47 Re: Post-CVE Wishlist