pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add hooks for session start and session end, take two
Date: Tue, 01 Oct 2019 03:16:06 +0000
Message-ID: <E1iF8dy-0000fc-9S@gemulon.postgresql.org> (raw)

Add hooks for session start and session end, take two

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

The first attempt was done with cd8ce3a but we lacked handling for
NO_INSTALLCHECK in the MSVC scripts (problem solved afterwards by
431f1599) so the buildfarm got angry.  This also fixes a couple of
issues noticed upon review compared to the first attempt, so the code
has slightly changed, resulting in a more simple test module.

Author: Fabrízio de Royes Mello, Yugo Nagata
Reviewed-by: Andrew Dunstan, Michael Paquier, Aleksandr Parfenov
Discussion: https://postgr.es/m/20170720204733.40f2b7eb.nagata@sraoss.co.jp
Discussion: https://postgr.es/m/20190823042602.GB5275@paquier.xyz

Branch
------
master

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

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       |  23 ++++
src/test/modules/test_session_hooks/README         |  11 ++
.../expected/test_session_hooks.out                |  37 ++++++
.../modules/test_session_hooks/session_hooks.conf  |   2 +
.../test_session_hooks/sql/test_session_hooks.sql  |  19 +++
.../test_session_hooks/test_session_hooks.c        | 146 +++++++++++++++++++++
11 files changed, 262 insertions(+)



view thread (29+ messages)  latest in thread

Message-ID: <E1iF8dy-0000fc-9S@gemulon.postgresql.org>
Permalink:  ../E1iF8dy-0000fc-9S@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1iF8dy-0000fc-9S@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Add hooks for session start and session end, take two
  In-Reply-To: <E1iF8dy-0000fc-9S@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox