1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +03:00

Revert hooks for session start and end, take two

The location of the session end hook has been chosen so as it is
possible to allow modules to do their own transactions, however any
trying to any any subsystem which went through before_shmem_exit()
would cause issues, limiting the pluggability of the hook.

Per discussion with Tom Lane and Andres Freund.

Discussion: https://postgr.es/m/18722.1569906636@sss.pgh.pa.us
This commit is contained in:
Michael Paquier
2019-10-02 09:55:27 +09:00
parent 540f316809
commit 9555cc8d2b
11 changed files with 0 additions and 271 deletions

View File

@ -78,8 +78,6 @@ static bool ThereIsAtLeastOneRole(void);
static void process_startup_options(Port *port, bool am_superuser);
static void process_settings(Oid databaseid, Oid roleid);
/* Hook for plugins to get control at end of session */
session_end_hook_type session_end_hook = NULL;
/*** InitPostgres support ***/
@ -1197,10 +1195,6 @@ ShutdownPostgres(int code, Datum arg)
* them explicitly.
*/
LockReleaseAll(USER_LOCKMETHOD, true);
/* Hook at session end */
if (session_end_hook)
(*session_end_hook) ();
}