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:
@ -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) ();
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user