Re: Add 64-bit XIDs into PostgreSQL 15

Maxim Orlov <orlovmg@gmail.com>

From: Maxim Orlov <orlovmg@gmail.com>
To: Zhang Mingli <zmlpostgres@gmail.com>
Cc: Justin Pryzby <pryzby@telsasoft.com>, Dilip Kumar <dilipbalaut@gmail.com>, Pavel Borisov <pashkin.elfe@gmail.com>, Aleksander Alekseev <aleksander@timescale.com>, pgsql-hackers@lists.postgresql.org, Stephen Frost <sfrost@snowman.net>, Alexander Korotkov <aekorotkov@gmail.com>, Andres Freund <andres@anarazel.de>, Ilya Anfimov <ilan@tzirechnoy.com>
Date: 2022-10-07T11:04:09Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Add SLRU tests for 64-bit page case

  2. Make use FullTransactionId in 2PC filenames

  3. Use larger segment file names for pg_notify

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

Attachments

Hi!

Here is a rebased version of the patch set.
Major changes are:
1. Fix rare replica fault.
   Upon page pruning in heap_page_prune, page fragmentation repair is
determined by
   a parameter repairFragmentation. At the same time, on a replica, upon
handling XLOG_HEAP2_PRUNE record type
   in heap_xlog_prune, we always call heap_page_prune_execute with
repairFragmentation parameter equal to true.
   This caused page inconsistency and lead to the crash of the replica. Fix
this by adding new flag in
   struct xl_heap_prune.
2. Add support for meson build.
3. Add assertion "buffer is locked" in HeapTupleCopyBaseFromPage.
4. Add assertion "buffer is locked exclusive" in heap_page_shift_base.
5. Prevent excessive growth of xmax in heap_prepare_freeze_tuple.

As always, reviews are very welcome!

-- 
Best regards,
Maxim Orlov.