Search Postgresql Archives

Re: snapshot question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec  7, 2022 at 10:20:09AM +0800, qihua wu wrote:
> 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?

See, slides 9-11:

	https://momjian.us/main/presentations/internals.html#mvcc

xip is a list of transaction that were open at the time the snapshot was
taken.  If the transaction commits after the snapshot is taken, it is
still invisible.

-- 
  Bruce Momjian  <bruce@xxxxxxxxxx>        https://momjian.us
  EDB                                      https://enterprisedb.com

Embrace your flaws.  They make you human, rather than perfect,
which you will never be.





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux