Re: TCP keepalive support for libpq

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: TCP keepalive support for libpq
Дата
Msg-id alpine.BSO.2.00.1002111214450.17942@leary.csoft.net
обсуждение исходный текст
Ответ на Re: TCP keepalive support for libpq  (Andrew Chernow <ac@esilo.com>)
Список pgsql-hackers

On Thu, 11 Feb 2010, Andrew Chernow wrote:

>
> Although, I think Dave's comments have made me change my mind about this 
> patch.  Looks like it serves a good purpose.  That said, there is no 
> guarentee the driver will implement the new feature ... JDBC seems to 
> lack the ability to get the backing Socket object but java can set 
> socket options. Maybe a JDBC kong fu master knows how to do this.

Use the tcpKeepAlive connection option as described here:

http://jdbc.postgresql.org/documentation/84/connect.html#connection-parameters

Java can only enable/disable keep alives, it can't set the desired 
timeout.

http://java.sun.com/javase/6/docs/api/java/net/Socket.html#setKeepAlive%28boolean%29

Kris Jurka


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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: TCP keepalive support for libpq
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Bug on pg_lesslog