From 81661336565d44719081c9b3d8a7042992e589d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Yhuel?= Date: Fri, 28 Jul 2023 14:15:55 +0200 Subject: [PATCH] Remove _PG_fini(). As explained by Julien Rouhaud in pg_stat_kcache's commit message 60944c460d: Postgres hasn't called this function for more than a decade (even before extensions were introduced), and version 15 officially removes it so let's get rid of it too. --- pg_query_settings.c | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/pg_query_settings.c b/pg_query_settings.c index 642aad9..7f3a7bc 100644 --- a/pg_query_settings.c +++ b/pg_query_settings.c @@ -51,7 +51,6 @@ PG_MODULE_MAGIC; /* Function definitions */ void _PG_init(void); -void _PG_fini(void); /* Variables */ @@ -385,24 +384,3 @@ _PG_init(void) if (debug) elog(DEBUG1,"Exiting _PG_init()"); } - -/* - * Reset hooks - */ -void -_PG_fini(void) -{ - - if (debug) elog(DEBUG1,"Entering _PG_fini()"); - - planner_hook = prevHook; - ExecutorEnd_hook = prev_ExecutorEnd; - -#if PG_VERSION_NUM < 130000 - if (debug) elog(DEBUG1,"Recovering post_parse_analyze_hook"); - post_parse_analyze_hook = prev_post_parse_analyze_hook; -#endif - - if (debug) elog(DEBUG1,"Exiting _PG_fini()"); - -}