agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Use the new shmem allocation functions in a few core subsystems
Date: Sun, 05 Apr 2026 23:27:44 +0000
Message-ID: <E1w9WsZ-0039A5-0W@gemulon.postgresql.org> (raw)
Use the new shmem allocation functions in a few core subsystems
These subsystems have some complicating properties, making them
slightly harder to convert than most:
- The initialization callbacks of some of these subsystems have
dependencies, i.e. they need to be initialized in the right order.
- The ProcGlobal pointer still needs to be inherited by the
BackendParameters mechanism on EXEC_BACKEND builds, because
ProcGlobal is required by InitProcess() to get a PGPROC entry, and
the PGPROC entry is required to use LWLocks, and usually attaching
to shared memory areas requires the use of LWLocks.
- Similarly, ProcSignal pointer still needs to be handled by
BackendParameters, because query cancellation connections access it
without calling InitProcess
Reviewed-by: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Reviewed-by: Matthias van de Meent <boekewurm+postgres@gmail.com>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Discussion: https://www.postgresql.org/message-id/CAExHW5vM1bneLYfg0wGeAa=52UiJ3z4vKd3AJ72X8Fw6k3KKrg@mail.gmail...
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/c6d55714ba4c282dcf5fb5fe5ef2a5cad0b06e81
Modified Files
--------------
src/backend/access/transam/twophase.c | 2 +-
src/backend/access/transam/varsup.c | 35 +++---
src/backend/port/posix_sema.c | 22 ++--
src/backend/port/sysv_sema.c | 21 ++--
src/backend/port/win32_sema.c | 11 +-
src/backend/storage/ipc/dsm.c | 64 ++++++-----
src/backend/storage/ipc/dsm_registry.c | 36 ++++---
src/backend/storage/ipc/ipci.c | 28 -----
src/backend/storage/ipc/latch.c | 8 +-
src/backend/storage/ipc/pmsignal.c | 51 +++++----
src/backend/storage/ipc/procarray.c | 110 +++++++++----------
src/backend/storage/ipc/procsignal.c | 64 ++++++-----
src/backend/storage/ipc/sinvaladt.c | 38 +++----
src/backend/storage/lmgr/proc.c | 191 +++++++++++++++++----------------
src/backend/utils/hash/dynahash.c | 3 +-
src/include/access/transam.h | 2 -
src/include/storage/dsm.h | 3 -
src/include/storage/dsm_registry.h | 2 -
src/include/storage/pg_sema.h | 6 +-
src/include/storage/pmsignal.h | 2 -
src/include/storage/proc.h | 2 -
src/include/storage/procarray.h | 2 -
src/include/storage/procsignal.h | 3 -
src/include/storage/sinvaladt.h | 2 -
src/include/storage/subsystemlist.h | 17 ++-
25 files changed, 344 insertions(+), 381 deletions(-)
Message-ID: <E1w9WsZ-0039A5-0W@gemulon.postgresql.org>
Permalink: ../E1w9WsZ-0039A5-0W@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1w9WsZ-0039A5-0W@gemulon.postgresql.org
reply
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: heikki.linnakangas@iki.fi, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Use the new shmem allocation functions in a few core subsystems
In-Reply-To: <E1w9WsZ-0039A5-0W@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox