Re: POC: make mxidoff 64 bits
Maxim Orlov <orlovmg@gmail.com>
From: Maxim Orlov <orlovmg@gmail.com>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: wenhui qiu <qiuwenhuifx@gmail.com>,
Alexander Korotkov <aekorotkov@gmail.com>, Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-11-19T17:53:49Z
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 →
-
Fix partial read handling in pg_upgrade's multixact conversion
- ac94ce8194e5 19 (unreleased) landed
-
Increase timeout in multixid_conversion upgrade test
- bd43940b02b2 19 (unreleased) landed
-
Improve sanity checks on multixid members length
- ecb553ae8211 19 (unreleased) landed
-
Clarify comment on multixid offset wraparound check
- 170361d7b869 14.21 landed
- b0b52b7123ae 15.16 landed
- 7d42e2367c6b 16.12 landed
- cd1a887fe9bf 17.8 landed
- 3fbad030a24d 18.2 landed
- 366dcdaf5779 19 (unreleased) landed
-
Never store 0 as the nextMXact
- 87a350e1f284 19 (unreleased) landed
-
Add runtime checks for bogus multixact offsets
- d4b7bde4183b 19 (unreleased) landed
-
Widen MultiXactOffset to 64 bits
- bd8d9c9bdfa0 19 (unreleased) landed
-
Move pg_multixact SLRU page format definitions to a separate header
- bb3b1c4f6462 19 (unreleased) landed
-
Convert confusing macros in multixact.c to static inline functions
- 0099b9408e8c 17.0 landed
-
Index SLRUs by 64-bit integers rather than by 32-bit integers
- 4ed8f0913bfd 17.0 cited
-
Cope with possible failure of the oldest MultiXact to exist.
- b6a3444fa635 9.4.4 cited
Attachments
- v9-0005-TEST-initdb-option-to-initialize-cluster-with-non.patch.txt (text/plain)
- v9-0004-Get-rid-of-MultiXactMemberFreezeThreshold-call.patch (application/octet-stream) patch v9-0004
- v9-0002-Use-64-bit-multixact-offsets.patch (application/octet-stream) patch v9-0002
- v9-0001-Use-64-bit-format-output-for-multixact-offsets.patch (application/octet-stream) patch v9-0001
- v9-0003-Make-pg_upgrade-convert-multixact-offsets.patch (application/octet-stream) patch v9-0003
- v9-0007-TEST-bump-catver.patch.txt (text/plain)
- v9-0006-TEST-add-src-bin-pg_upgrade-t-005_offset.pl.patch.txt (text/plain)
Oops! Sorry for the noise. I've must have been overworking yesterday and messed up the working branches. v7 was a correct set and v8 don't. Here is the correction with extended Perl test. The test itself is in src/bin/pg_upgrade/t/005_offset.pl It is rather heavy and took about 45 minutes on my i5 with 2.7 Gb data generated. Basically, each test here is creating a cluster and fill it with multixacts. Thus, dozens of segments are created using two methods. One is with prepared transactions, and it creates, roughly, the same amount of segments for members and for offsets. The other one is based on Heikki's multixids.py and creates more members than offsets. I've used both of these methods to generate as much diverse data as possible. Here is how I test this patch set: 1. You need two pg clusters: the "old" one, i.e. without patch set, and the "new" with patch set v9 applied. 2. Apply v9-0005-TEST-initdb-option-to-initialize-cluster-with-non.patch.txt to the "old" and "new" clusters. Note, this is only patch required for "old" cluster. This will allow you to create a cluster with non-standard initial multixact and multixact offset. Unfortunately, this patch was not did not arouse public interest since it is assumed that there is similar functionality to the pg_resetwal utility. But similar is not mean equal. See, pg_resetwal must be used after cluster init, thus, we step into some problems with vacuum and some SLRU segments must be filled with zeroes. Also, template0 datminmxid must be manually updated. So, in me view, using this patch is justified and very handy here. 3. Also, apply all the "TEST" (0006 and 0007) patches to the "new" cluster. 4. Build "old" and "new" pg clusters. 5. Run the test with: PROVE_TESTS=t/005_offset.pl PG_TEST_NOCLEAN=1 oldinstall=/home/orlov/proj/OFFSET3/pgsql-old make check -s -C src/bin/pg_upgrade/ 6. In my case, it took around 45 minutes and generate roughly 2.7 Gb of data. "TEST" patches, of course, are for the test purposes and not to be committed. In src/bin/pg_upgrade/t/005_offset.pl I try to consider next cases: - Basic sanity checks. Here I test various initial multi and offset values (including wraparound) and see how appropriate segments are generated. - pg_upgarde tests. Here is oldinstall ENV is for. Run pg_upgrade for old cluster with multi and offset values just like in previous step. i.e. with various combinations. - Self pg_upgarde. -- Best regards, Maxim Orlov.