Add hooks for session start and session end, take two
Michael Paquier <michael@paquier.xyz>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/tcop/postgres.c | modified | +6 −0 |
| src/backend/utils/init/postinit.c | modified | +6 −0 |
| src/include/tcop/tcopprot.h | modified | +7 −0 |
| src/test/modules/Makefile | modified | +1 −0 |
| src/test/modules/test_session_hooks/expected/test_session_hooks.out | added | +37 −0 |
| src/test/modules/test_session_hooks/.gitignore | added | +4 −0 |
| src/test/modules/test_session_hooks/Makefile | added | +23 −0 |
| src/test/modules/test_session_hooks/README | added | +11 −0 |
| src/test/modules/test_session_hooks/session_hooks.conf | added | +2 −0 |
| src/test/modules/test_session_hooks/sql/test_session_hooks.sql | added | +19 −0 |
| src/test/modules/test_session_hooks/test_session_hooks.c | added | +146 −0 |
Discussion
- [PATCH] A hook for session start 65 messages · 2017-07-20 → 2017-11-28
- Hooks for session start and end, take two 25 messages · 2019-08-23 → 2019-12-21