pgsql: Convert SLRUs to use the new shmem allocation functions

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Convert SLRUs to use the new shmem allocation functions
Date: 2026-04-05 23:27:44
Message-ID: E1w9WsZ-0039AB-0k@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Convert SLRUs to use the new shmem allocation functions

I replaced the old SimpleLruInit() function without a backwards
compatibility wrapper, because few extensions define their own SLRUs.

Reviewed-by: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
Reviewed-by: Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>
Reviewed-by: Daniel Gustafsson <daniel(at)yesql(dot)se>
Discussion: https://www.postgresql.org/message-id/CAExHW5vM1bneLYfg0wGeAa=52UiJ3z4vKd3AJ72X8Fw6k3KKrg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/2e0943a8597e1eeaec184465ba8b1f2f453a69e0

Modified Files
--------------
src/backend/access/transam/clog.c | 53 +++--
src/backend/access/transam/commit_ts.c | 85 +++----
src/backend/access/transam/multixact.c | 136 ++++++------
src/backend/access/transam/slru.c | 366 ++++++++++++++++---------------
src/backend/access/transam/subtrans.c | 57 +++--
src/backend/commands/async.c | 115 +++++-----
src/backend/storage/ipc/ipci.c | 16 --
src/backend/storage/ipc/shmem.c | 9 +-
src/backend/storage/lmgr/predicate.c | 273 ++++++++++-------------
src/backend/utils/activity/pgstat_slru.c | 1 +
src/include/access/clog.h | 2 -
src/include/access/commit_ts.h | 2 -
src/include/access/multixact.h | 2 -
src/include/access/slru.h | 114 ++++++----
src/include/access/subtrans.h | 2 -
src/include/commands/async.h | 3 -
src/include/storage/predicate.h | 5 -
src/include/storage/shmem_internal.h | 1 +
src/include/storage/subsystemlist.h | 10 +
src/test/modules/test_slru/test_slru.c | 106 ++++-----
src/tools/pgindent/typedefs.list | 4 +-
21 files changed, 689 insertions(+), 673 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2026-04-05 23:52:37 pgsql: Add tests for lock statistics, take two
Previous Message Heikki Linnakangas 2026-04-05 23:27:43 pgsql: Convert pg_stat_statements to use the new shmem allocation funct