Skip to content

Commit 609975a

Browse files
committed
Remove _PG_fini().
Postgres hasn't called this function for more than a decade (even before extensions were introduced), and version 15 officially removed it so let's get rid of it too.
1 parent f4a87c5 commit 609975a

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

pg_wait_sampling.c

+2-11
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
PG_MODULE_MAGIC;
4040

4141
void _PG_init(void);
42-
void _PG_fini(void);
4342

4443
/* Global variables */
4544
bool shmem_initialized = false;
@@ -359,22 +358,14 @@ _PG_init(void)
359358
*/
360359
prev_shmem_startup_hook = shmem_startup_hook;
361360
shmem_startup_hook = pgws_shmem_startup;
361+
prev_shmem_startup_hook = shmem_startup_hook;
362+
shmem_startup_hook = pgws_shmem_startup;
362363
planner_hook_next = planner_hook;
363364
planner_hook = pgws_planner_hook;
364365
prev_ExecutorEnd = ExecutorEnd_hook;
365366
ExecutorEnd_hook = pgws_ExecutorEnd;
366367
}
367368

368-
/*
369-
* Module unload callback
370-
*/
371-
void
372-
_PG_fini(void)
373-
{
374-
/* Uninstall hooks. */
375-
shmem_startup_hook = prev_shmem_startup_hook;
376-
}
377-
378369
/*
379370
* Find PGPROC entry responsible for given pid assuming ProcArrayLock was
380371
* already taken.

0 commit comments

Comments
 (0)