pgsql: Fix registering shmem callbacks in single-user mode - Mailing list pgsql-committers

From Heikki Linnakangas
Subject pgsql: Fix registering shmem callbacks in single-user mode
Date
Msg-id E1wzARO-00000002BGP-1Tw8@gemulon.postgresql.org
Whole thread
List pgsql-committers
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.com
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(-)


Attachment

pgsql-committers by date:

Previous
From: Peter Eisentraut
Date:
Subject: pgsql: Revert "Remove old readline API workaround"
Next
From: David Rowley
Date:
Subject: pgsql: Close relations opened specifically for AFTER triggers