| From: | Kris Jurka <books(at)ejurka(dot)com> |
|---|---|
| To: | Andrew Chernow <ac(at)esilo(dot)com> |
| Cc: | Magnus Hagander <magnus(at)hagander(dot)net>, daveg <daveg(at)sonic(dot)net>, Tollef Fog Heen <tollef(dot)fog(dot)heen(at)collabora(dot)co(dot)uk>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: TCP keepalive support for libpq |
| Date: | 2010-02-11 17:23:03 |
| Message-ID: | alpine.BSO.2.00.1002111214450.17942@leary.csoft.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Joshua D. Drake | 2010-02-11 17:24:55 | Re: [HACKERS] Bug on pg_lesslog |
| Previous Message | Greg Sabino Mullane | 2010-02-11 17:08:30 | Re: Confusion over Python drivers |