Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9555cc8

Browse files
committed
Revert hooks for session start and end, take two
The location of the session end hook has been chosen so as it ispossible to allow modules to do their own transactions, however anytrying 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
1 parent540f316 commit9555cc8

File tree

11 files changed

+0
-271
lines changed

11 files changed

+0
-271
lines changed

‎src/backend/tcop/postgres.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,6 @@ static ProcSignalReason RecoveryConflictReason;
171171
staticMemoryContextrow_description_context=NULL;
172172
staticStringInfoDatarow_description_buf;
173173

174-
/* Hook for plugins to get control at start of session */
175-
session_start_hook_typesession_start_hook=NULL;
176-
177174
/* ----------------------------------------------------------------
178175
*decls for routines only used in this file
179176
* ----------------------------------------------------------------
@@ -3971,9 +3968,6 @@ PostgresMain(int argc, char *argv[],
39713968
if (!IsUnderPostmaster)
39723969
PgStartTime=GetCurrentTimestamp();
39733970

3974-
if (session_start_hook)
3975-
(*session_start_hook) ();
3976-
39773971
/*
39783972
* POSTGRES main processing loop begins here
39793973
*

‎src/backend/utils/init/postinit.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,6 @@ static bool ThereIsAtLeastOneRole(void);
7878
staticvoidprocess_startup_options(Port*port,boolam_superuser);
7979
staticvoidprocess_settings(Oiddatabaseid,Oidroleid);
8080

81-
/* Hook for plugins to get control at end of session */
82-
session_end_hook_typesession_end_hook=NULL;
8381

8482
/*** InitPostgres support ***/
8583

@@ -1197,10 +1195,6 @@ ShutdownPostgres(int code, Datum arg)
11971195
* them explicitly.
11981196
*/
11991197
LockReleaseAll(USER_LOCKMETHOD, true);
1200-
1201-
/* Hook at session end */
1202-
if (session_end_hook)
1203-
(*session_end_hook) ();
12041198
}
12051199

12061200

‎src/include/tcop/tcopprot.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,6 @@ extern PGDLLIMPORT const char *debug_query_string;
3030
externintmax_stack_depth;
3131
externintPostAuthDelay;
3232

33-
/* Hook for plugins to get control at start and end of session */
34-
typedefvoid (*session_start_hook_type) (void);
35-
typedefvoid (*session_end_hook_type) (void);
36-
37-
externPGDLLIMPORTsession_start_hook_typesession_start_hook;
38-
externPGDLLIMPORTsession_end_hook_typesession_end_hook;
39-
4033
/* GUC-configurable parameters */
4134

4235
typedefenum

‎src/test/modules/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ SUBDIRS = \
2121
test_predtest\
2222
test_rbtree\
2323
test_rls_hooks\
24-
test_session_hooks\
2524
test_shm_mq\
2625
unsafe_tests\
2726
worker_spi

‎src/test/modules/test_session_hooks/.gitignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

‎src/test/modules/test_session_hooks/Makefile

Lines changed: 0 additions & 23 deletions
This file was deleted.

‎src/test/modules/test_session_hooks/README

Lines changed: 0 additions & 11 deletions
This file was deleted.

‎src/test/modules/test_session_hooks/expected/test_session_hooks.out

Lines changed: 0 additions & 37 deletions
This file was deleted.

‎src/test/modules/test_session_hooks/session_hooks.conf

Lines changed: 0 additions & 2 deletions
This file was deleted.

‎src/test/modules/test_session_hooks/sql/test_session_hooks.sql

Lines changed: 0 additions & 19 deletions
This file was deleted.

‎src/test/modules/test_session_hooks/test_session_hooks.c

Lines changed: 0 additions & 155 deletions
This file was deleted.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp