> You may want to try tweaking /proc/sys/net/ipv4/tcp_keepalive_* on the
> server to make TCP keepalives notice the dead connection faster (these
> are global settings, though). There are corresponding setsockopt() calls
> you could make on a per-socket basis if you are prepared to tweak the
> server code.
I'd rather not, because as Markus said there may be other services
started on the DB machine in the future (it's just a prototype testing
for a new project). I found that there is a property called
"statement_timeout" in the postgresql.conf. This limits the time, in
which a statement must be executed. It looks like a solution to me,
but I need to test it.
10x anyway :)