]> granicus.if.org Git - postgresql/commit
Add hooks for session start and session end, take two
authorMichael Paquier <michael@paquier.xyz>
Tue, 1 Oct 2019 03:15:25 +0000 (12:15 +0900)
committerMichael Paquier <michael@paquier.xyz>
Tue, 1 Oct 2019 03:15:25 +0000 (12:15 +0900)
commite788bd924c19e296bd34316e30e3ba1b68354e64
treedc0be40d99dc72eff1dce9ed404b6a48544101e4
parent41a6de41ed697df5d84f3144c6c60b4a9725381f
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
src/backend/tcop/postgres.c
src/backend/utils/init/postinit.c
src/include/tcop/tcopprot.h
src/test/modules/Makefile
src/test/modules/test_session_hooks/.gitignore [new file with mode: 0644]
src/test/modules/test_session_hooks/Makefile [new file with mode: 0644]
src/test/modules/test_session_hooks/README [new file with mode: 0644]
src/test/modules/test_session_hooks/expected/test_session_hooks.out [new file with mode: 0644]
src/test/modules/test_session_hooks/session_hooks.conf [new file with mode: 0644]
src/test/modules/test_session_hooks/sql/test_session_hooks.sql [new file with mode: 0644]
src/test/modules/test_session_hooks/test_session_hooks.c [new file with mode: 0644]