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: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2020-09-14T09:44:54Z
Lists: pgsql-hackers
Hi I am checking last patch, and there are notices 1. disable_session_start_trigger should be SU_BACKEND instead SUSET 2. The documentation should be enhanced - there is not any note about behave when there are unhandled exceptions, about motivation for this event trigger 3. regress tests should be enhanced - the cases with exceptions are not tested 4. This trigger is not executed again after RESET ALL or DISCARD ALL - it can be a problem if somebody wants to use this trigger for initialisation of some session objects with some pooling solutions. 5. The handling errors don't work well for canceling. If event trigger waits for some event, then cancel disallow connect although connected user is superuser CREATE OR REPLACE FUNCTION on_login_proc2() RETURNS EVENT_TRIGGER AS $$ begin perform pg_sleep(10000); raise notice '%', fx1(100);raise notice 'kuku kuku'; end $$ language plpgsql; probably nobody will use pg_sleep in this routine, but there can be wait on some locks ... Regards Pavel
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