Re: On login trigger: take three

Поиск
Список
Период
Сортировка
От Konstantin Knizhnik
Тема Re: On login trigger: take three
Дата
Msg-id ab593ca2-268b-ef02-77d4-ea93fdecd6eb@postgrespro.ru
обсуждение исходный текст
Ответ на Re: On login trigger: take three  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: On login trigger: take three  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers


On 10.12.2020 18:12, Pavel Stehule wrote:

My idea was a little bit different. Inside postinit initialize some global variables with info if there are event triggers or not. And later you can use this variable to start transactions and  other things.

There will be two access to pg_event_trigger, but it can eliminate useless and probably more expensive start_transaction and end_transaction.



Do you mean some variable in shared memory or GUCs?
It was my first idea - to use some flag in shared memory to make it possible fast check that there are not event triggers.
But this flag should be sent per database. May be I missed something, but there is no any per-database shared memory  data structure in Postgres.
Certainly it is possible to organize some hash db->event_info, but it makes this patch several times more complex.

From my point of view it is better to have separate GUC disabling just client connection events and switch it on by default.
So only those who need this events with switch it on, other users will not pay any extra cost for it.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Pavel Borisov
Дата:
Сообщение: Re: Speeding up GIST index creation for tsvectors
Следующее
От: Lukas Meisegeier
Дата:
Сообщение: Feature Proposal: Add ssltermination parameter for SNI-based LoadBalancing