From: | Aleksander Alekseev <aleksander(at)timescale(dot)com> |
---|---|
To: | Pavel Borisov <pashkin(dot)elfe(at)gmail(dot)com> |
Cc: | Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Add 64-bit XIDs into PostgreSQL 15 |
Date: | 2022-01-28 14:30:17 |
Message-ID: | CAJ7c6TPUtdzPN_m=WhxEzgLOvH_ZRjwQCp_q-52gtbU=K0zjHw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi Pavel,
> Please feel free to discuss readme and your opinions on the current patch and proposed changes [1].
Just a quick question about this design choice:
> On-disk tuple format remains unchanged. 32-bit t_xmin and t_xmax store the
> lower parts of 64-bit XMIN and XMAX values. Each heap page has additional
> 64-bit pd_xid_base and pd_multi_base which are common for all tuples on a page.
> They are placed into a pd_special area - 16 bytes in the end of a heap page.
> Actual XMIN/XMAX for a tuple are calculated upon reading a tuple from a page
> as follows:
>
> XMIN = t_xmin + pd_xid_base.
> XMAX = t_xmax + pd_xid_base/pd_multi_base.
Did you consider using 4 bytes for pd_xid_base and another 4 bytes for
(pd_xid_base/pd_multi_base)? This would allow calculating XMIN/XMAX
as:
XMIN = (t_min_extra_bits << 32) | t_xmin
XMAX = (t_max_extra_bits << 32) | t_xmax
... and save 8 extra bytes in the pd_special area. Or maybe I'm
missing some context here?
--
Best regards,
Aleksander Alekseev
From | Date | Subject | |
---|---|---|---|
Next Message | Dilip Kumar | 2022-01-28 14:40:15 | Re: Make relfile tombstone files conditional on WAL level |
Previous Message | Robert Haas | 2022-01-28 14:30:02 | Re: Support for NSS as a libpq TLS backend |