Thread: Support millisecond accuracy for timeouts
Hello postgres jdbc users,
loginTimeout and socketTimeout connection parameters ( http://jdbc.postgresql.org/documentation/head/connect.html#connection-parameters ) seem to be at 1 second accuracy. Could this be improved to support millisecond accuracy? Would like to configure these timeouts at value lower then a second.
Regards,
Stevo.
loginTimeout and socketTimeout connection parameters ( http://jdbc.postgresql.org/documentation/head/connect.html#connection-parameters ) seem to be at 1 second accuracy. Could this be improved to support millisecond accuracy? Would like to configure these timeouts at value lower then a second.
Regards,
Stevo.
On 25 November 2011 16:07, Stevo Slavić <sslavic@gmail.com> wrote: > loginTimeout and socketTimeout connection parameters ( > http://jdbc.postgresql.org/documentation/head/connect.html#connection-parameters > ) seem to be at 1 second accuracy. Could this be improved to support > millisecond accuracy? Would like to configure these timeouts at value lower > then a second. loginTimeout should already support fractional values; what are you seeing that makes you think it has whole-second resolution? socketTimeout looks like a small change to do the same (parse as float and scale to milliseconds), maybe you can send a patch for that? Oliver
Hello Oliver,
Thanks for quick reply! I didn't look in the code, relied on docs I referenced and they specify following:
{quote}
loginTimeout = int
Specify how long to wait for establishment of a database connection. The timeout is specified in seconds.
{quote}
Docs are similar for socketTimeout.
Will have a look in the code.
Regards,
Stevo.
Thanks for quick reply! I didn't look in the code, relied on docs I referenced and they specify following:
{quote}
loginTimeout = int
Specify how long to wait for establishment of a database connection. The timeout is specified in seconds.
{quote}
Docs are similar for socketTimeout.
Will have a look in the code.
Regards,
Stevo.
On Thu, Nov 24, 2011 at 8:22 PM, Oliver Jowett <oliver@opencloud.com> wrote:
On 25 November 2011 16:07, Stevo Slavić <sslavic@gmail.com> wrote:loginTimeout should already support fractional values; what are you
> loginTimeout and socketTimeout connection parameters (
> http://jdbc.postgresql.org/documentation/head/connect.html#connection-parameters
> ) seem to be at 1 second accuracy. Could this be improved to support
> millisecond accuracy? Would like to configure these timeouts at value lower
> then a second.
seeing that makes you think it has whole-second resolution?
socketTimeout looks like a small change to do the same (parse as float
and scale to milliseconds), maybe you can send a patch for that?
Oliver
On 25 November 2011 16:26, Stevo Slavić <sslavic@gmail.com> wrote: > loginTimeout = int > > Specify how long to wait for establishment of a database connection. The > timeout is specified in seconds. That one actually accepts a float. Oliver