|
@@ -51,10 +51,11 @@
|
|
#include <float.h>
|
|
#include <float.h>
|
|
#endif
|
|
#endif
|
|
|
|
|
|
-static int pg_mod_init(void);
|
|
|
|
-
|
|
|
|
MODULE_VERSION
|
|
MODULE_VERSION
|
|
|
|
|
|
|
|
+static int pg_mod_init(void);
|
|
|
|
+static void pg_mod_destroy(void);
|
|
|
|
+
|
|
int pg_connect_timeout = 0; /* Default is unlimited */
|
|
int pg_connect_timeout = 0; /* Default is unlimited */
|
|
int pg_retries = 2; /* How many times should the module try re-execute failed commands.
|
|
int pg_retries = 2; /* How many times should the module try re-execute failed commands.
|
|
* 0 disables reconnecting */
|
|
* 0 disables reconnecting */
|
|
@@ -102,7 +103,7 @@ struct module_exports exports = {
|
|
params, /* module parameters */
|
|
params, /* module parameters */
|
|
pg_mod_init, /* module initialization function */
|
|
pg_mod_init, /* module initialization function */
|
|
0, /* response function*/
|
|
0, /* response function*/
|
|
- 0, /* destroy function */
|
|
|
|
|
|
+ pg_mod_destroy, /* destroy function */
|
|
0, /* oncancel function */
|
|
0, /* oncancel function */
|
|
0 /* per-child init function */
|
|
0 /* per-child init function */
|
|
};
|
|
};
|
|
@@ -555,4 +556,9 @@ static int pg_mod_init(void)
|
|
return km_postgres_mod_init();
|
|
return km_postgres_mod_init();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static void pg_mod_destroy(void)
|
|
|
|
+{
|
|
|
|
+ pg_destroy_lock_set();
|
|
|
|
+}
|
|
|
|
+
|
|
/** @} */
|
|
/** @} */
|