I have a problem in my multithreaded application that uses JDBC PostgreSQL driver. Sometimes it hangs for many hours with various queries to various databases. To stop such hangs I set query timeout to 10 minutes, but from my application it doesn't work, it not return after this time.