Skip to content

Use floating point values to set time related settings #36940

@Algunenano

Description

@Algunenano

Currently all time span settings are being parsed as UInt64 with 2 problems:

  • It's silently ignoring decimal values. For example SET max_execution_time = 1.5 will set the max_execution_time to 1, and what is worse, 0.5 will be set as 0.
  • The smallest values you can set is 1.

In order to allow for more granularity I'd like to change the value to be a Float64 (positive and finite) instead which would fix both instances and allow reducing timeouts (connect_timeout, max_execution_time, http_connection_timeout, etc) under a second.

Although the internal representation would still be a TimeDiff (i.e. Int64), this would still be a breaking change since not all UInt64 values can be accurately represented as Float64. Nevertheless, I don't expect anyone to be using values over 2^53.

Any thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions