XID formatting and SLRU refactorings (was: Add 64-bit XIDs into PostgreSQL 15)

From: Aleksander Alekseev <aleksander(at)timescale(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, Maxim Orlov <orlovmg(at)gmail(dot)com>, Pavel Borisov <pashkin(dot)elfe(at)gmail(dot)com>, Alexander Korotkov <aekorotkov(at)gmail(dot)com>, Ilya Anfimov <ilan(at)tzirechnoy(dot)com>
Subject: XID formatting and SLRU refactorings (was: Add 64-bit XIDs into PostgreSQL 15)
Date: 2022-03-17 13:12:28
Message-ID: CAJ7c6TPDOYBYrnCAeyndkBktO0WG2xSdYduTF0nxq+vfkmTF5Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi hackers,

This thread is a fork of [1], created per request by several people in
the discussion. It includes two patches from the patchset that we
believe can be delivered in PG15. The rest of the patches are
targeting PG >= 16 and can be discussed further in [1].

v19-0001 changes the format string for XIDs from %u to XID_FMT. This
refactoring allows us to switch to UINT64_FORMAT by changing one
#define in the future patches.

Kyotaro suggested using `errmsg("blah blah %lld ..", (long long)
xid)` instead in order to simplify localization of the error messages.
Personally I don't have a strong opinion here. Either approach will
work and will affect the error messages eventually. Please let us know
what you think.

v19-0002 refactors SLRU and the dependent code so that `pageno`s
become int64's. This is a requirement for the rest of the patches.

The patches were in pretty good shape last time I checked several days
ago, I even suggested changing their status to "Ready for Committer".
Let's see what cfbot will tell us.

[1]: https://postgr.es/m/CACG%3DezZe1NQSCnfHOr78AtAZxJZeCvxrts0ygrxYwe%3DpyyjVWA%40mail.gmail.com

--
Best regards,
Aleksander Alekseev

Attachment Content-Type Size
v19-0001-Use-XID_FMT-macro-to-format-XIDs.patch application/octet-stream 97.7 KB
v19-0002-Use-64-bit-pages-in-SLRU.patch application/octet-stream 26.4 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2022-03-17 13:14:52 Re: ICU for global collation
Previous Message osumi.takamichi@fujitsu.com 2022-03-17 12:16:15 RE: Skipping logical replication transactions on subscriber side