Re: Trying to understand Tuple Header

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: "Subramanian, Ramachandran" <ramachandran(dot)subramanian(at)alte-leipziger(dot)de>, "pgsql-novice(at)lists(dot)postgresql(dot)org" <pgsql-novice(at)lists(dot)postgresql(dot)org>
Subject: Re: Trying to understand Tuple Header
Date: 2026-05-03 22:50:23
Message-ID: 97767.1777848623@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-novice

"David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> On Sun, May 3, 2026 at 12:25 PM Subramanian,Ramachandran <
> ramachandran(dot)subramanian(at)alte-leipziger(dot)de> wrote:
>> The binary value of t_infomask for both the tuples are identical, but they
>> produce different column values for xmin_commited, xmin_aborted …. in the
>> SQL !!!.

> You didn't re-check the infomask data after running the select query,
> instead assuming the bits didn't change. They did. SELECT is not a
> read-only operation, it participates in optimizations. Called "writing
> hint bits".

Well, it *might* update the hint bits, but it can only do that after
the tuple is visible to all live transactions. So it matters what
else is happening within the database. In any case, pg_xact is the
ultimate source of truth about whether a tuple is committed or not.

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Subramanian,Ramachandran 2026-05-04 04:04:30 AW: Trying to understand Tuple Header
Previous Message David G. Johnston 2026-05-03 19:48:47 Re: Trying to understand Tuple Header