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

Aleksander Alekseev <aleksander@timescale.com>

From: Aleksander Alekseev <aleksander@timescale.com>
To: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Cc: Pavel Borisov <pashkin.elfe@gmail.com>, Japin Li <japinli@hotmail.com>, Alexander Korotkov <aekorotkov@gmail.com>, Peter Eisentraut <peter.eisentraut@enterprisedb.com>, Kyotaro Horiguchi <horikyota.ntt@gmail.com>, Ilya Anfimov <ilan@tzirechnoy.com>, Maxim Orlov <orlovmg@gmail.com>
Date: 2022-03-18T13:50:01Z
Lists: pgsql-hackers

Attachments

Hi hackers,

> Aleksander Alekseev, we've done this major revision mentioned above and
you are free to continue working on this patch set.
>
> Reviews and proposals are very welcome!

Many thanks!

Here is an new version with the following changes compared to v20:

- Commit messages and links to the discussions were updated;
- XID_TYPE name seemed to be slightly misleading. I changed it to
XID_FMT_TYPE. Not 100% sure if we really need this typedef though. If not,
XID_FMT_TYPE is easy to replace in the .patch files. Same for
XID32_SCANF_FMT definition;
- I noticed that pg_resetwal.c continues to use %u to format XIDs. Fixed;
- Since v20-0001 modifies gettext() arguments, I'm pretty sure the
corresponding .po files should be modified as well. I addressed this in a
separate patch in order to simplify the review;

To me personally v21 looks almost OK. The comments in c.h should be
rewritten depending on whether we choose to keep XID_FMT_TYPE and/or
XID32_SCANF_FMT. The patchset passes all the tests.

(As a side note, it looks like cfbot was slightly confused by forking the
thread and modifying the CF entry. It couldn't find v20. If somebody knows
how to fix this, please help.)

-- 
Best regards,
Aleksander Alekseev

Commits

  1. Fix more holes with SLRU code in need of int64 for segment numbers

  2. Use more consistently int64 for page numbers in SLRU-related code

  3. Improve comments in slru.{c,h} about segment name format

  4. Reorder actions in ProcArrayApplyRecoveryInfo()

  5. Fix typo in 5a1dfde8334b

  6. Fix warning due non-standard inline declaration in 4ed8f0913bfdb5f355

  7. Add SLRU tests for 64-bit page case

  8. Make use FullTransactionId in 2PC filenames

  9. Use larger segment file names for pg_notify

  10. Index SLRUs by 64-bit integers rather than by 32-bit integers

  11. Keep track of transaction commit timestamps

  12. Handle 5-char filenames in SlruScanDirectory