Skip to content

Commit 98d54bb

Browse files
committed
Back out the session_start and session_end hooks feature.
It's become apparent during testing that there are problems with at least the testing regime. I don't think we should have it without a working test regime, and the difficulties might indicate implementation problems anyway, so I'm backing out the whole thing until that's sorted out. This reverts commits 7459484 9989f92 cd8ce3a
1 parent 164d633 commit 98d54bb

File tree

14 files changed

+0
-239
lines changed

14 files changed

+0
-239
lines changed

src/backend/tcop/postgres.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,6 @@ static ProcSignalReason RecoveryConflictReason;
169169
static MemoryContext row_description_context = NULL;
170170
static StringInfoData row_description_buf;
171171

172-
/* Hook for plugins to get control at start of session */
173-
session_start_hook_type session_start_hook = NULL;
174-
175172
/* ----------------------------------------------------------------
176173
* decls for routines only used in this file
177174
* ----------------------------------------------------------------
@@ -3860,9 +3857,6 @@ PostgresMain(int argc, char *argv[],
38603857
if (!IsUnderPostmaster)
38613858
PgStartTime = GetCurrentTimestamp();
38623859

3863-
if (session_start_hook)
3864-
(*session_start_hook) ();
3865-
38663860
/*
38673861
* POSTGRES main processing loop begins here
38683862
*

src/backend/utils/init/postinit.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@ static bool ThereIsAtLeastOneRole(void);
7676
static void process_startup_options(Port *port, bool am_superuser);
7777
static void process_settings(Oid databaseid, Oid roleid);
7878

79-
/* Hook for plugins to get control at end of session */
80-
session_end_hook_type session_end_hook = NULL;
8179

8280
/*** InitPostgres support ***/
8381

@@ -1156,10 +1154,6 @@ ShutdownPostgres(int code, Datum arg)
11561154
* them explicitly.
11571155
*/
11581156
LockReleaseAll(USER_LOCKMETHOD, true);
1159-
1160-
/* Hook at session end */
1161-
if (session_end_hook)
1162-
(*session_end_hook) ();
11631157
}
11641158

11651159

src/include/tcop/tcopprot.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,6 @@ extern PGDLLIMPORT const char *debug_query_string;
3535
extern int max_stack_depth;
3636
extern int PostAuthDelay;
3737

38-
/* Hook for plugins to get control at start and end of session */
39-
typedef void (*session_start_hook_type) (void);
40-
typedef void (*session_end_hook_type) (void);
41-
42-
extern PGDLLIMPORT session_start_hook_type session_start_hook;
43-
extern PGDLLIMPORT session_end_hook_type session_end_hook;
44-
4538
/* GUC-configurable parameters */
4639

4740
typedef enum

src/test/modules/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ SUBDIRS = \
1515
test_pg_dump \
1616
test_rbtree \
1717
test_rls_hooks \
18-
test_session_hooks \
1918
test_shm_mq \
2019
worker_spi
2120

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 & 25 deletions
This file was deleted.

src/test/modules/test_session_hooks/README

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

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

Lines changed: 0 additions & 31 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 & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy