Re: On login trigger: take three
От | Alexander Korotkov |
---|---|
Тема | Re: On login trigger: take three |
Дата | |
Msg-id | CAPpHfdsVgL6cb4a60oXH5aydXMVF5Z2sgBc1_MsobVibREJYAA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: On login trigger: take three (Alexander Korotkov <aekorotkov@gmail.com>) |
Ответы |
Re: On login trigger: take three
Re: On login trigger: take three |
Список | pgsql-hackers |
Hi! On Tue, Oct 3, 2023 at 8:35 PM Alexander Korotkov <aekorotkov@gmail.com> wrote: > Thank you for the interesting ideas. I'd like to try to revive the > version with the flag in pg_database. Will use other ideas as backup > if no success. I've revived the patch version with pg_database.dathasloginevt flag. I took v32 version [1] and made the following changes. * Incorporate enchantments made on flagless version of patch. * Read dathasloginevt during InitPostgres() to prevent extra catalog access and even more notable StartTransactionCommand() when there are no login triggers. * Hold lock during setting of pg_database.dathasloginevt flag (v32 version actually didn't prevent race condition). * Fix AlterEventTrigger() to check event name not trigger name * Acquire conditional lock while resetting pg_database.dathasloginevt flag to prevent new database connection to hang waiting another transaction to finish. This version should be good and has no overhead. Any thoughts? Daniel, could you please re-run the performance tests? Links 1. https://www.postgresql.org/message-id/CAMEv5_vDjceLr54WUCNPPVsJs8WBWWsRW826VppNEFoLC1LAEw%40mail.gmail.com ------ Regards, Alexander Korotkov
В списке pgsql-hackers по дате отправления: