pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix registering shmem callbacks in single-user mode
2+ messages / 1 participants
[nested] [flat]

* pgsql: Fix registering shmem callbacks in single-user mode
@ 2026-08-26 10:01 Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 2+ messages in thread

From: Heikki Linnakangas @ 2026-08-26 10:01 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix registering shmem callbacks in single-user mode

RegisterShmemCallbacks() should not be called from the postmaster
process after postmaster startup. Add an assertion for that, and fix
the check for whether it's being called for "after startup"
allocations to take single-user mode into account.

Author: Ayush Tiwari <ayushtiwari.slg01@gmail.com>
Discussion: https://www.postgresql.org/message-id/CAJTYsWU7epjUL1-xrpYeOrmkmq20M2Q22Y_SRb8PWQG8KNQyDw@mail.gmail...
Backpatch-through: 19

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/edc095a2652971d6b2a95082c22dbdf34fc01d30

Modified Files
--------------
src/backend/storage/ipc/shmem.c                    | 10 ++++++++--
.../modules/test_shmem/t/001_late_shmem_alloc.pl   | 22 ++++++++++++++++++++++
2 files changed, 30 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Fix registering shmem callbacks in single-user mode
@ 2026-08-26 10:01 Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 2+ messages in thread

From: Heikki Linnakangas @ 2026-08-26 10:01 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix registering shmem callbacks in single-user mode

RegisterShmemCallbacks() should not be called from the postmaster
process after postmaster startup. Add an assertion for that, and fix
the check for whether it's being called for "after startup"
allocations to take single-user mode into account.

Author: Ayush Tiwari <ayushtiwari.slg01@gmail.com>
Discussion: https://www.postgresql.org/message-id/CAJTYsWU7epjUL1-xrpYeOrmkmq20M2Q22Y_SRb8PWQG8KNQyDw@mail.gmail...
Backpatch-through: 19

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/b259ece92a951e799d8ace7a865d6269cc1cdd71

Modified Files
--------------
src/backend/storage/ipc/shmem.c                    | 10 ++++++++--
.../modules/test_shmem/t/001_late_shmem_alloc.pl   | 22 ++++++++++++++++++++++
2 files changed, 30 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2026-08-26 10:01 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-08-26 10:01 pgsql: Fix registering shmem callbacks in single-user mode Heikki Linnakangas <heikki.linnakangas@iki.fi>
2026-08-26 10:01 pgsql: Fix registering shmem callbacks in single-user mode Heikki Linnakangas <heikki.linnakangas@iki.fi>

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