File tree 1 file changed +21
-0
lines changed
1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -314,6 +314,11 @@ pathman_xact_cb(XactEvent event, void *arg)
314
314
* -------------------
315
315
*/
316
316
317
+ #if PG_VERSION_NUM >= 150000
318
+ static shmem_request_hook_type prev_shmem_request_hook = NULL ;
319
+ static void pg_pathman_shmem_request (void );
320
+ #endif
321
+
317
322
/* Set initial values for all Postmaster's forks */
318
323
void
319
324
_PG_init (void )
@@ -326,7 +331,12 @@ _PG_init(void)
326
331
}
327
332
328
333
/* Request additional shared resources */
334
+ #if PG_VERSION_NUM >= 150000
335
+ prev_shmem_request_hook = shmem_request_hook ;
336
+ shmem_request_hook = pg_pathman_shmem_request ;
337
+ #else
329
338
RequestAddinShmemSpace (estimate_pathman_shmem_size ());
339
+ #endif
330
340
331
341
/* Assign pg_pathman's initial state */
332
342
pathman_init_state .pg_pathman_enable = DEFAULT_PATHMAN_ENABLE ;
@@ -363,6 +373,17 @@ _PG_init(void)
363
373
#endif
364
374
}
365
375
376
+ #if PG_VERSION_NUM >= 150000
377
+ static void
378
+ pg_pathman_shmem_request (void )
379
+ {
380
+ if (prev_shmem_request_hook )
381
+ prev_shmem_request_hook ();
382
+
383
+ RequestAddinShmemSpace (estimate_pathman_shmem_size ());
384
+ }
385
+ #endif
386
+
366
387
/* Get cached PATHMAN_CONFIG relation Oid */
367
388
Oid
368
389
get_pathman_config_relid (bool invalid_is_ok )
You can’t perform that action at this time.
0 commit comments