Re: Add 64-bit XIDs into PostgreSQL 15

From: Pavel Borisov <pashkin(dot)elfe(at)gmail(dot)com>
To: "Finnerty, Jim" <jfinnert(at)amazon(dot)com>
Cc: Simon Riggs <simon(dot)riggs(at)enterprisedb(dot)com>, Maxim Orlov <orlovmg(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add 64-bit XIDs into PostgreSQL 15
Date: 2022-01-14 19:38:46
Message-ID: CALT9ZEEr8vuSpvjFQgyLJrn1+ha4yP-_4WZiGea2SvyEG6_FTg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> We intend to do the following work on the patch soon:
> 1. Write a detailed README
> 2. Split the patch into several pieces including a separate part for
> XID_FMT. But if committers meanwhile choose to commit Jim's XID_FMT patch
> we also appreciate this and will rebase our patch accordingly.
> 2A. Probably refactor it to store precalculated XMIN/XMAX in memory
> tuple representation instead of t_xid_base/t_multi_base
> 2B. Split the in-memory part of a patch as a separate
> 3. Construct some variants for leaving "double xmax" format as a temporary
> one just after upgrade for having only one persistent on-disk format
> instead of two.
> 3A. By using SQL function "vacuum doublexmax;"
> OR
> 3B. By freeing space on all heap pages for pd_special before
> pg-upgrade.
> OR
> 3C. By automatically repacking all "double xmax" pages after upgrade
> (with a priority specified by common vacuum-related GUCs)
> 4. Intentionally prohibit starting a new transaction with XID difference
> of more than 2^32 from the oldest currently running one. This is to enforce
> some dba's action for cleaning defunct transaction but not binding one:
> he/she can wait if they consider these old transactions not defunct.
> 5. Investigate and add a solution for archs without 64-bit atomic values.
> 5A. Provide XID 8-byte alignment for systems where 64-bit atomics
> is provided for 8-byte aligned values.
> 5B. Wrap XID reading into PG atomic locks for remaining 32-bit ones
> (they are expected to be rare).
>

Hi, hackers!

PFA patch with README for 64xid proposal. It is 0003 patch of the same v6,
that was proposed earlier [1].
As always, I very much appreciate your ideas on this readme patch, on
overall 64xid patch [1], and on the roadmap on its improvement quoted above.

[1]
https://www.postgresql.org/message-id/CACG%3DezZe1NQSCnfHOr78AtAZxJZeCvxrts0ygrxYwe%3DpyyjVWA%40mail.gmail.com

--
Best regards,
Pavel Borisov

Postgres Professional: http://postgrespro.com <http://www.postgrespro.com>

Attachment Content-Type Size
v6-0003-README-for-64bit-xid.patch application/octet-stream 6.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bossart, Nathan 2022-01-14 19:42:29 Re: Add sub-transaction overflow status in pg_stat_activity
Previous Message James Coleman 2022-01-14 19:24:50 Re: Parallelize correlated subqueries that execute within each worker