Karl Wright <daddywri(at)gmail(dot)com> writes:
> ... By the end of that time I usually see between one and three "stuck"
> threads, all waiting inside the JDBC driver for a response from the
> postgresql server. I can provide a stack trace if requested.
How about a stack trace from the connected backend? And what is its
state as shown by the pg_stat_activity and pg_locks views? It's hard
to tell from what you say here whether the problem is on the server or
client side, which is surely the first thing to isolate.
regards, tom lane