>> [...]
>
> Yeah, something like that. I don't think it would be necessary to set
> statement_timeout, you can inject that in your script or postgresql.conf if
> you want. I don't think aborting a transaction that's already started is
> necessary either. You could count it as LATE, but let it finish first.
I've implemented something along these simplified lines. The latency is
not limited as such, but slow (over the limit) queries are counted and
reported.
--
Fabien.