Allow passing a pointer to GetNamedDSMSegment()'s init callback.
authorNathan Bossart <nathan@postgresql.org>
Mon, 15 Dec 2025 20:27:16 +0000 (14:27 -0600)
committerNathan Bossart <nathan@postgresql.org>
Mon, 15 Dec 2025 20:27:16 +0000 (14:27 -0600)
commit48d4a1423d2e92d10077365532d92e059ba2eb2e
treedeb5eb18eaef14743bff7889a3f3112cda58d5c6
parent64bf53dd61ea3224020bb340725a4df6a27bc974
Allow passing a pointer to GetNamedDSMSegment()'s init callback.

This commit adds a new "void *arg" parameter to
GetNamedDSMSegment() that is passed to the initialization callback
function.  This is useful for reusing an initialization callback
function for multiple DSM segments.

Author: Zsolt Parragi <zsolt.parragi@percona.com>
Reviewed-by: Sami Imseih <samimseih@gmail.com>
Discussion: https://postgr.es/m/CAN4CZFMjh8TrT9ZhWgjVTzBDkYZi2a84BnZ8bM%2BfLPuq7Cirzg%40mail.gmail.com
contrib/pg_prewarm/autoprewarm.c
doc/src/sgml/xfunc.sgml
src/backend/storage/ipc/dsm_registry.c
src/include/storage/dsm_registry.h
src/test/modules/injection_points/injection_points.c
src/test/modules/test_dsa/test_dsa.c
src/test/modules/test_dsm_registry/test_dsm_registry.c