Re: [HACKERS] Support for JDBC setQueryTimeout, et al.

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: [HACKERS] Support for JDBC setQueryTimeout, et al.
Дата
Msg-id 4CC0396C0200002500036C38@gw.wicourts.gov
обсуждение исходный текст
Ответ на Re: [HACKERS] Support for JDBC setQueryTimeout, et al.  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: [HACKERS] Support for JDBC setQueryTimeout, et al.
Список pgsql-jdbc
Bruce Momjian <bruce@momjian.us> wrote:

> why would we do this client-side rather than server-side?

Because the timeout is supposed to be a limit on the time allowed
for specific Java methods to complete, which might be running a
large number of SQL statements within one invocation, and which may
include significant network latency.  It's a lot of work to get
"pretty close" on the server side, and you can never really
implement exactly what the JDBC API is requesting.

What if you have an app which can draw data from any of a number of
remote databases, and you want to use this limit so if one becomes
unavailable for some reason you can re-run the request on another
within a reasonable time?  The network connection goes down after
you submit your request, you've got a period of minutes or hours
until TCP gives up, and the user expects a response within a few
seconds...

If you implement something with server-side semantics, there's
nothing to prevent an application which is PostgreSQL-aware from
accessing it through JDBC, of course.  statement_timeout and other
GUCs can be set locally to your heart's content.

-Kevin

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Support for JDBC setQueryTimeout, et al.
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Support for JDBC setQueryTimeout, et al.