snapshot question

From: qihua wu <staywithpin(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: snapshot question
Date: 2022-12-07 02:20:09
Message-ID: CAPoYto+ouSQoXmLEaXh0VdVV8Y1w54FDcsR4CcE-vBX8Zbgc2A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Per the following link:
https://www.sobyte.net/post/2022-08/postgres-snapshot/
To get a snapshot we need to know xmin, xmax and xip. my question is why do
we need them? Since every tuple in a page has t_xmin and t_xmax based on
the page layout(
https://www.postgresql.org/docs/current/storage-page-layout.html), if we
has a snapshot at xip 12345, couldn't we just check every tuple whose
t_xmin is lower than 12345 and already committed?

Thanks,
Qihua

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2022-12-07 02:32:03 Re: snapshot question
Previous Message Tom Lane 2022-12-06 20:47:26 Re: Re[2]: PG 14.5 -- Impossible to restore dump due to interaction/order of views, functions, and generated columns