From: Alexander Korotkov <akorotkov@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Index SLRUs by 64-bit integers rather than by 32-bit integers
Date: Wed, 29 Nov 2023 00:09:26 +0000
Message-ID: <E1r888r-007jQ0-S0@gemulon.postgresql.org> (raw)
Index SLRUs by 64-bit integers rather than by 32-bit integers
We've had repeated bugs in the area of handling SLRU wraparound in the past,
some of which have caused data loss. Switching to an indexing system for SLRUs
that does not wrap around should allow us to get rid of a whole bunch
of problems and improve the overall reliability of the system.
This particular patch however only changes the indexing and doesn't address
the wraparound per se. This is going to be done in the following patches.
Author: Maxim Orlov, Aleksander Alekseev, Alexander Korotkov, Teodor Sigaev
Author: Nikita Glukhov, Pavel Borisov, Yura Sokolov
Reviewed-by: Jacob Champion, Heikki Linnakangas, Alexander Korotkov
Reviewed-by: Japin Li, Pavel Borisov, Tom Lane, Peter Eisentraut, Andres Freund
Reviewed-by: Andrey Borodin, Dilip Kumar, Aleksander Alekseev
Discussion: https://postgr.es/m/CACG%3DezZe1NQSCnfHOr78AtAZxJZeCvxrts0ygrxYwe%3DpyyjVWA%40mail.gmail.com
Discussion: https://postgr.es/m/CAJ7c6TPDOYBYrnCAeyndkBktO0WG2xSdYduTF0nxq%2BvfkmTF5Q%40mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/4ed8f0913bfdb5f3551de3c27fc2c2e880abc5a2
Modified Files
--------------
src/backend/access/rmgrdesc/clogdesc.c | 10 +-
src/backend/access/rmgrdesc/committsdesc.c | 10 +-
src/backend/access/rmgrdesc/mxactdesc.c | 6 +-
src/backend/access/transam/clog.c | 64 ++++++----
src/backend/access/transam/commit_ts.c | 52 ++++----
src/backend/access/transam/multixact.c | 62 +++++-----
src/backend/access/transam/slru.c | 143 +++++++++++++++-------
src/backend/access/transam/subtrans.c | 34 +++--
src/backend/commands/async.c | 20 +--
src/backend/storage/lmgr/predicate.c | 13 +-
src/include/access/clog.h | 2 +-
src/include/access/commit_ts.h | 2 +-
src/include/access/slru.h | 35 ++++--
src/include/storage/proc.h | 2 +-
src/include/storage/sync.h | 2 +-
src/test/modules/test_slru/expected/test_slru.out | 2 +-
src/test/modules/test_slru/test_slru--1.0.sql | 14 +--
src/test/modules/test_slru/test_slru.c | 32 +++--
18 files changed, 303 insertions(+), 202 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: akorotkov@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Index SLRUs by 64-bit integers rather than by 32-bit integers
In-Reply-To: <E1r888r-007jQ0-S0@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox