Re: On login trigger: take three
Pavel Stehule <pavel.stehule@gmail.com>
From: Pavel Stehule <pavel.stehule@gmail.com>
To: Konstantin Knizhnik <k.knizhnik@postgrespro.ru>
Cc: Greg Nancarrow <gregn4422@gmail.com>,
PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2020-12-26T07:03:16Z
Lists: pgsql-hackers
so 26. 12. 2020 v 8:00 odesílatel Pavel Stehule <pavel.stehule@gmail.com> napsal: > Hi > > > Thank you. >> I have applied all your fixes in on_connect_event_trigger-12.patch. >> >> Concerning enable_client_connection_trigger GUC, I think that it is >> really useful: it is the fastest and simplest way to disable login triggers >> in case >> of some problems with them (not only for superuser itself, but for all >> users). Yes, it can be also done using "ALTER EVENT TRIGGER DISABLE". >> But assume that you have a lot of databases with different login policies >> enforced by on-login event triggers. And you want temporary disable them >> all, for example for testing purposes. >> In this case GUC is most convenient way to do it. >> >> > There was typo in patch > > diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml > index f810789..8861f1b 100644 > --- a/doc/src/sgml/config.sgml > +++ b/doc/src/sgml/config.sgml > @@ -1,4 +1,4 @@ > -<!-- doc/src/sgml/config.sgml --> > +\<!-- doc/src/sgml/config.sgml --> > > I have not any objections against functionality or design. I tested the > performance, and there are no negative impacts when this feature is not > used. There is significant overhead related to plpgsql runtime > initialization, but when this trigger will be used, then probably some > other PLpgSQL procedures and functions will be used too, and then this > overhead can be ignored. > > * make without warnings > * make check-world passed > * doc build passed > > Possible ToDo: > > The documentation can contain a note so usage connect triggers in > environments with short life sessions and very short fast queries without > usage PLpgSQL functions or procedures can have negative impact on > performance due overhead of initialization of PLpgSQL engine. > > I'll mark this patch as ready for committers > looks so this patch has not entry in commitfestapp 2021-01 Regards Pavel > Regards > > Pavel > > > >> >> Konstantin Knizhnik >> Postgres Professional: http://www.postgrespro.com >> The Russian Postgres Company >> >>
Commits
-
Fix some typos in event trigger docs
- 5fce30e77fe1 17.0 landed
-
Use heap_inplace_update() to unset pg_database.dathasloginevt
- 8be93177c46b 17.0 landed
-
Remove the flaky check in event_trigger_login regression test
- 4b885d01f967 17.0 landed
-
Fix instable 006_login_trigger.pl test
- 06be01eb266b 17.0 landed
-
Add support event triggers on authenticated login
- e83d1b0c40cc 17.0 landed
-
Add GUC for temporarily disabling event triggers
- 7750fefdb2b8 17.0 landed
-
Fix typo in reference to __FreeBSD__.
- e52f8b301ed5 16.0 cited
-
Restore robustness of TAP tests that wait for postmaster restart.
- f452aaf7d4a9 14.0 cited
-
Restore the portal-level snapshot after procedure COMMIT/ROLLBACK.
- 84f5c2908dad 14.0 cited