Re: On login trigger: take three

Pavel Stehule <pavel.stehule@gmail.com>

From: Pavel Stehule <pavel.stehule@gmail.com>
To: Mikhail Gribkov <youzhick@gmail.com>
Cc: Ted Yu <yuzhihong@gmail.com>, Nikita Malakhov <hukutoc@gmail.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>, Ian Lawrence Barwick <barwick@gmail.com>, Daniel Gustafsson <daniel@yesql.se>, Sergey Shinderuk <s.shinderuk@postgrespro.ru>, Ivan Panchenko <wao@mail.ru>, Andres Freund <andres@anarazel.de>, Tom Lane <tgl@sss.pgh.pa.us>, Greg Nancarrow <gregn4422@gmail.com>, Teodor Sigaev <teodor@sigaev.ru>, Ibrar Ahmed <ibrar.ahmad@gmail.com>, vignesh C <vignesh21@gmail.com>, Amit Kapila <amit.kapila16@gmail.com>, Masahiko Sawada <sawada.mshk@gmail.com>
Date: 2023-01-15T06:32:17Z
Lists: pgsql-hackers
Hi


so 14. 1. 2023 v 22:56 odesílatel Mikhail Gribkov <youzhick@gmail.com>
napsal:

> Hi Pavel,
>
> Thanks for pointing out the tests. I completely agree that using an
> exception inside on-login trigger should be tested. It cannot be done via
> regular *.sql/*.out regress tests, thus I have added another perl test to
> authentication group doing this.
> Attached v36 patch contains this test along with the fresh rebase on
> master.
>
> --
>  best regards,
>     Mikhail A. Gribkov
>
> e-mail: youzhick@gmail.com
> *http://www.flickr.com/photos/youzhick/albums
> <http://www.flickr.com/photos/youzhick/albums>*
> http://www.strava.com/athletes/5085772
> phone: +7(916)604-71-12
> Telegram: @youzhick
>
>
>
> On Thu, Jan 12, 2023 at 9:51 AM Pavel Stehule <pavel.stehule@gmail.com>
> wrote:
>
>> Hi
>>
>> I checked this patch and it looks well. All tests passed. Together with
>> https://commitfest.postgresql.org/41/4013/ it can be a good feature.
>>
>> I re-tested impact on performance and for the worst case looks like less
>> than 1% (0.8%). I think it is acceptable. Tested pgbench scenario "SELECT
>> 1"
>>
>> pgbench -f ~/test.sql -C -c 3 -j 5 -T 100 -P10 postgres
>>
>> 733 tps (master), 727 tps (patched).
>>
>> I think raising an exception inside should be better tested - not it is
>> only in 001_stream_rep.pl - generally more tests are welcome - there are
>> no tested handling exceptions.
>>
>
Thank you

check-world passed without problems
build doc passed without problems
I think so tests are now enough

I'll mark this patch as ready for committer

Regards

Pavel




>
>> Regards
>>
>> Pavel
>>
>>

Commits

  1. Fix some typos in event trigger docs

  2. Use heap_inplace_update() to unset pg_database.dathasloginevt

  3. Remove the flaky check in event_trigger_login regression test

  4. Fix instable 006_login_trigger.pl test

  5. Add support event triggers on authenticated login

  6. Add GUC for temporarily disabling event triggers

  7. Fix typo in reference to __FreeBSD__.

  8. Restore robustness of TAP tests that wait for postmaster restart.

  9. Restore the portal-level snapshot after procedure COMMIT/ROLLBACK.