2011/11/10 Tomas Vondra <tv(at)fuzzy(dot)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
In response to
Responses
pgsql-hackers by date
| Next: | From: Robert Haas | Date: 2011-11-25 01:56:07 |
| Subject: Re: logging in high performance systems. |
| Previous: | From: Peter Geoghegan | Date: 2011-11-25 01:05:15 |
| Subject: Re: Inlining comparators as a performance optimisation |