pgsql: Add hooks for session start and session end

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Add hooks for session start and session end
Date: 2017-11-15 15:25:34
Message-ID: E1eEzZG-0001kP-KI@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Add hooks for session start and session end

These hooks can be used in loadable modules. A simple test module is
included.

Discussion: https://postgr.es/m/20170720204733.40f2b7eb.nagata@sraoss.co.jp

Fabrízio de Royes Mello and Yugo Nagata
Reviewed by Michael Paquier and Aleksandr Parfenov

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/cd8ce3a22c0b48d32ffe6543837ba3bb647ac2b2

Modified Files
--------------
src/backend/tcop/postgres.c | 6 +
src/backend/utils/init/postinit.c | 6 +
src/include/tcop/tcopprot.h | 7 ++
src/test/modules/Makefile | 1 +
src/test/modules/test_session_hooks/.gitignore | 4 +
src/test/modules/test_session_hooks/Makefile | 21 ++++
src/test/modules/test_session_hooks/README | 2 +
.../expected/test_session_hooks.out | 31 +++++
.../modules/test_session_hooks/session_hooks.conf | 2 +
.../test_session_hooks/sql/test_session_hooks.sql | 12 ++
.../test_session_hooks/test_session_hooks--1.0.sql | 4 +
.../test_session_hooks/test_session_hooks.c | 134 +++++++++++++++++++++
.../test_session_hooks/test_session_hooks.control | 3 +
13 files changed, 233 insertions(+)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2017-11-15 15:28:42 pgsql: Centralize executor-related partitioning code.
Previous Message Robert Haas 2017-11-15 13:38:19 pgsql: Fix typo.

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-11-15 15:29:03 Re: [HACKERS] moving some partitioning code to executor
Previous Message Tom Lane 2017-11-15 15:23:13 Re: Rewriting PL/Python's typeio code