From fe749265661f6c1699753b3c5f2ad526983e975c Mon Sep 17 00:00:00 2001 From: PedroHenrique0713 Date: Sat, 11 Jul 2026 20:41:28 -0300 Subject: [PATCH 1/2] docs: document query.timeout duration key alongside query.timeout.sec --- documentation/configuration/cairo-engine.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/documentation/configuration/cairo-engine.md b/documentation/configuration/cairo-engine.md index 7112f46b65..bde06b951d 100644 --- a/documentation/configuration/cairo-engine.md +++ b/documentation/configuration/cairo-engine.md @@ -58,6 +58,10 @@ available via the HTTP header [`options`](/docs/query/pgwire/overview/) connection property. +The related `query.timeout` key sets the same global timeout using a duration +value (for example, `120s`, `1m` or `500ms`). When both are set, `query.timeout` +takes precedence over `query.timeout.sec`. + ## Commit and write behavior ### cairo.commit.mode From e9ea3d5746242e3c2fa00c6146a5b1a66255946b Mon Sep 17 00:00:00 2001 From: PedroHenrique0713 Date: Tue, 4 Aug 2026 09:30:13 -0300 Subject: [PATCH 2/2] docs: give query.timeout its own entry and mark query.timeout.sec deprecated Review feedback: document query.timeout as a property in its own right, right above query.timeout.sec, and state the precedence rule in both sections. query.timeout.sec is registered as deprecated in favour of query.timeout (PropServerConfiguration.java, registerDeprecated), so the note points readers at the replacement key. --- documentation/configuration/cairo-engine.md | 32 ++++++++++++++++----- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/documentation/configuration/cairo-engine.md b/documentation/configuration/cairo-engine.md index 99b5310338..e8eddc0f45 100644 --- a/documentation/configuration/cairo-engine.md +++ b/documentation/configuration/cairo-engine.md @@ -54,20 +54,38 @@ The locale used to handle timestamp types. When `false`, disables the `reload_config()` SQL function. -### query.timeout.sec +### query.timeout -- **Default**: `60` +- **Default**: `60s` - **Reloadable**: no -A global timeout in seconds for long-running queries. Per-query overrides are -available via the HTTP header +A global timeout for long-running queries, given as a duration: `500ms`, `120s`, +`2m` and `1h` are all valid, and a plain number is read as milliseconds. + +This key replaces `query.timeout.sec`. When both are set, `query.timeout` takes +precedence; when neither is set, queries time out after 60 seconds. + +Per-query overrides are available via the HTTP header [`Statement-Timeout`](/docs/query/rest-api/#headers) or the Postgres [`options`](/docs/query/pgwire/overview/) connection property. -The related `query.timeout` key sets the same global timeout using a duration -value (for example, `120s`, `1m` or `500ms`). When both are set, `query.timeout` -takes precedence over `query.timeout.sec`. +### query.timeout.sec + +- **Default**: `60` +- **Reloadable**: no + +:::note + +`query.timeout.sec` is deprecated. Use `query.timeout` instead, which takes a +duration rather than a whole number of seconds. QuestDB reports this key as a +deprecation advisory during config validation at startup. + +::: + +A global timeout in seconds for long-running queries. When `query.timeout` is +also set, it takes precedence and this key is ignored. Per-query overrides work +the same as for `query.timeout`. ## Commit and write behavior