Skip to content

Commit 8327afb

Browse files
committed
save correct hook to prev_shmem_startup_hook for PostgreSQL 15
1 parent f91e671 commit 8327afb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/plpgsql_check.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,11 @@ void _PG_fini(void);
9393
#endif
9494

9595
#if PG_VERSION_NUM >= 150000
96+
9697
shmem_request_hook_type prev_shmem_request_hook = NULL;
98+
9799
#endif
100+
98101
shmem_startup_hook_type prev_shmem_startup_hook = NULL;
99102

100103
bool plpgsql_check_regress_test_mode;
@@ -327,7 +330,7 @@ _PG_init(void)
327330
*/
328331
#if PG_VERSION_NUM >= 150000
329332

330-
prev_shmem_startup_hook = shmem_request_hook;
333+
prev_shmem_startup_hook = shmem_startup_hook;
331334
shmem_request_hook = plpgsql_check_profiler_shmem_request;
332335

333336
#endif
@@ -354,7 +357,9 @@ void
354357
_PG_fini(void)
355358
{
356359
#if PG_VERSION_NUM >= 150000
360+
357361
shmem_request_hook = prev_shmem_request_hook;
362+
358363
#endif
359364
shmem_startup_hook = prev_shmem_startup_hook;
360365

0 commit comments

Comments
 (0)