Re: proposal : backend startup hook / after logon trigger

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: proposal : backend startup hook / after logon trigger
Дата
Msg-id CA+TgmoY5ANkeC_iZxXg22nc-G77iYJ1c6A=jdgBVPU9D4-cPCw@mail.gmail.com
обсуждение исходный текст
Ответ на proposal : backend startup hook / after logon trigger  (Tomas Vondra <tv@fuzzy.cz>)
Ответы Re: proposal : backend startup hook / after logon trigger  ("Tomas Vondra" <tv@fuzzy.cz>)
Список pgsql-hackers
2011/11/10 Tomas Vondra <tv@fuzzy.cz>:
> Is there any particular reason why there's not a "backend start hook",
> executed right after a backend is initialized? I've tried a very simple
> PoC (basically just a new hook definition, called from PostgresMain(),
> see the after-logon-hook.diff (and a simple module that uses it is in
> logon.c).
>
> This obviously is not a complete patch or something, but is there a good
> reason why this is a stupid idea?

[ catching up on some old email ]

I've thought of this before, but I'm not exactly clear on what the use
cases are.

The particular place where you've put this hook doesn't look right to
me.  I think it would get re-executed after each ERROR.

Also, if you're going to insist that the triggers be written in C
(blech!) then there's not much point in including a TRY/CATCH block
here.  Let the user do that themselves if they are so inclined; it's
not free.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: Inlining comparators as a performance optimisation
Следующее
От: Robert Haas
Дата:
Сообщение: Re: logging in high performance systems.