|From:||Michael Paquier <michael(at)paquier(dot)xyz>|
|To:||Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>|
|Subject:||Hooks for session start and end, take two|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
Attached is a patch set to respawn the issue of $subject which has
been discussed here:
The patch has been committed once as of cd8ce3a but it got shortly
reverted after with 98d54bb because of buildfarm failures.
The root of the buildfarm issues was that session hooks cannot be
tested with a simple LOAD, hence we need to mark the test with
NO_INSTALLCHECK. Unfortunately we lacked support for that in MSVC
scripts, until I solved that with 431f1599 when refactoring PGXS
makefile rules for regression tests.
While on it, I have done a review over the patch, cleaning it up a bit
and I found some issues, so the initial patch was not fully baked
- previous hook calls were only called for normal backends, which was
incorrect as we define the backend so as we apply no backend-related
filtering for the hook.
- The README could be also more talkative.
- test_session_hooks--1.0.sql also got confused with the module name.
And actually there is no need to have the SQL and control files just
for a module loading a hook. So it is enough to use MODULE_big for
- The query generated needs to use quote_literal_cstr for the string
values added to the query.
- sample_session_start_hook and sample_session_end_hook missed a
(void), causing a compiler warning on Windows.
Attached is an updated patch set to reintroduce the hook, as there was
a ask for it recently, fixing also the issue that we previously tried
to deal with. I have tested the patch on Windows to make sure that
the test gets correctly bypassed, so this time we should not have any
I am adding that to next CF. Credits go of course to the initial
authors and reviewers of this feature.
|Next Message||Peter Geoghegan||2019-08-23 04:33:41||Re: [HACKERS] [WIP] Effective storage of duplicates in B-tree index.|
|Previous Message||Melanie Plageman||2019-08-23 04:19:47||Re: Cleanup isolation specs from unused steps|