summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorNathan Bossart2025-12-15 20:27:16 +0000
committerNathan Bossart2025-12-15 20:27:16 +0000
commit48d4a1423d2e92d10077365532d92e059ba2eb2e (patch)
treedeb5eb18eaef14743bff7889a3f3112cda58d5c6 /contrib
parent64bf53dd61ea3224020bb340725a4df6a27bc974 (diff)
Allow passing a pointer to GetNamedDSMSegment()'s init callback.HEADmaster
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
Diffstat (limited to 'contrib')
-rw-r--r--contrib/pg_prewarm/autoprewarm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/pg_prewarm/autoprewarm.c b/contrib/pg_prewarm/autoprewarm.c
index 5ba1240d51f..a87b046d8be 100644
--- a/contrib/pg_prewarm/autoprewarm.c
+++ b/contrib/pg_prewarm/autoprewarm.c
@@ -858,7 +858,7 @@ autoprewarm_dump_now(PG_FUNCTION_ARGS)
}
static void
-apw_init_state(void *ptr)
+apw_init_state(void *ptr, void *arg)
{
AutoPrewarmSharedState *state = (AutoPrewarmSharedState *) ptr;
@@ -880,7 +880,7 @@ apw_init_shmem(void)
apw_state = GetNamedDSMSegment("autoprewarm",
sizeof(AutoPrewarmSharedState),
apw_init_state,
- &found);
+ &found, NULL);
return found;
}