diff --git a/documentation/configuration-utils/_cairo.config.json b/documentation/configuration-utils/_cairo.config.json index d86bce70b..9ad85beb9 100644 --- a/documentation/configuration-utils/_cairo.config.json +++ b/documentation/configuration-utils/_cairo.config.json @@ -1,4 +1,8 @@ { + "config.reload.enabled": { + "default": "true", + "description": "When `false`, disables reload_config() SQL function." + }, "query.timeout.sec": { "default": "60", "description": "A global timeout (in seconds) for long-running queries. Timeout for each query can override the default by setting HTTP header [`Statement-Timeout`](/docs/reference/api/rest/#headers) or Postgres [`options`](/docs/reference/api/postgres/#list-of-supported-connection-properties)." @@ -259,7 +263,7 @@ "default": "64", "description": "Size of InsertModel pool in SqlParser." }, - "cairo.sql.insert.model.batch.size": { + "cairo.sql.insert.model.batch.size": { "default": "1000000", "description": "Batch size for non-atomic INSERT INTO SELECT statements." }, @@ -459,4 +463,4 @@ "default": "256k", "description": "mmap sliding page size that TableWriter uses to append data for each column specifically for System tables." } -} +} \ No newline at end of file diff --git a/documentation/configuration-utils/_http.config.json b/documentation/configuration-utils/_http.config.json index 1498cf811..b151ff238 100644 --- a/documentation/configuration-utils/_http.config.json +++ b/documentation/configuration-utils/_http.config.json @@ -53,7 +53,8 @@ }, "http.multipart.header.buffer.size": { "default": "512", - "description": "Buffer size in bytes used by the HTTP multipart content parser." + "description": "Buffer size in bytes used by the HTTP multipart content parser.", + "reloadable": true }, "http.multipart.idle.spin.count": { "default": "10000", @@ -61,11 +62,13 @@ }, "http.receive.buffer.size": { "default": "1M", - "description": "Size of receive buffer." + "description": "Size of receive buffer.", + "reloadable": true }, "http.request.header.buffer.size": { "default": "64K", - "description": "Size of internal buffer allocated for HTTP request headers. The value is rounded up to the nearest power of 2. When HTTP requests contain headers that exceed the buffer size server will disconnect the client with HTTP error in server log." + "description": "Size of internal buffer allocated for HTTP request headers. The value is rounded up to the nearest power of 2. When HTTP requests contain headers that exceed the buffer size server will disconnect the client with HTTP error in server log.", + "reloadable": true }, "http.response.header.buffer.size": { "default": "32K", @@ -85,7 +88,8 @@ }, "http.send.buffer.size": { "default": "2M", - "description": "Size of the internal send buffer. Larger buffer sizes result in fewer I/O interruptions the server is making at the expense of memory usage per connection. There is a limit of send buffer size after which increasing it stops being useful in terms of performance. 2MB seems to be optimal value." + "description": "Size of the internal send buffer. Larger buffer sizes result in fewer I/O interruptions the server is making at the expense of memory usage per connection. There is a limit of send buffer size after which increasing it stops being useful in terms of performance. 2MB seems to be optimal value.", + "reloadable": true }, "http.static.index.file.name": { "default": "index.html", @@ -215,4 +219,4 @@ "default": "HTTP/1.1", "description": "Protocol version, other supported value is `HTTP/1.0`." } -} +} \ No newline at end of file diff --git a/documentation/configuration-utils/_iam.config.json b/documentation/configuration-utils/_iam.config.json index 54bdbd5d0..7303a04ce 100644 --- a/documentation/configuration-utils/_iam.config.json +++ b/documentation/configuration-utils/_iam.config.json @@ -13,7 +13,8 @@ }, "acl.admin.password": { "default": "quest", - "description": "The password of the built-in admin user." + "description": "The password of the built-in admin user.", + "reloadable": true }, "acl.basic.auth.realm.enabled": { "default": "false", @@ -83,4 +84,4 @@ "default": "true", "description": "Enables/disables authentication for the ILP over TCP endpoint only." } -} +} \ No newline at end of file diff --git a/documentation/configuration-utils/_postgres.config.json b/documentation/configuration-utils/_postgres.config.json index 5185a41eb..d08c568a1 100644 --- a/documentation/configuration-utils/_postgres.config.json +++ b/documentation/configuration-utils/_postgres.config.json @@ -9,7 +9,8 @@ }, "pg.net.connection.limit": { "default": "64", - "description": "The maximum number permitted for simultaneous Postgres connections to the server. This value is intended to control server memory consumption." + "description": "The maximum number permitted for simultaneous Postgres connections to the server. This value is intended to control server memory consumption.", + "reloadable": true }, "pg.net.connection.timeout": { "default": "300000", @@ -49,23 +50,28 @@ }, "pg.password": { "default": "quest", - "description": "Postgres database password." + "description": "Postgres database password.", + "reloadable": true }, "pg.user": { "default": "admin", - "description": "Postgres database username." + "description": "Postgres database username.", + "reloadable": true }, "pg.readonly.user.enabled": { "default": "false", - "description": "Enable or disable Postgres database read-only user account. When enabled, this additional user can be used to open read-only connections to the database." + "description": "Enable or disable Postgres database read-only user account. When enabled, this additional user can be used to open read-only connections to the database.", + "reloadable": true }, "pg.readonly.password": { "default": "quest", - "description": "Postgres database read-only user password." + "description": "Postgres database read-only user password.", + "reloadable": true }, "pg.readonly.user": { "default": "user", - "description": "Postgres database read-only user username." + "description": "Postgres database read-only user username.", + "reloadable": true }, "pg.select.cache.enabled": { "default": "true", @@ -109,11 +115,13 @@ }, "pg.recv.buffer.size": { "default": "1M", - "description": "Size of the buffer for receiving data." + "description": "Size of the buffer for receiving data.", + "reloadable": true }, "pg.send.buffer.size": { "default": "1M", - "description": "Size of the buffer for sending data." + "description": "Size of the buffer for sending data.", + "reloadable": true }, "pg.date.locale": { "default": "en", @@ -142,5 +150,10 @@ "pg.binary.param.count.capacity": { "default": "2", "description": "Size of the initial capacity for the pool used for binary bind variables." + }, + "pg.named.statement.limit": { + "default": "64", + "description": "Size of the named statement pool.", + "reloadable": true } -} +} \ No newline at end of file diff --git a/documentation/configuration-utils/_tcp.config.json b/documentation/configuration-utils/_tcp.config.json index 62cd413a9..e8c0d5c6e 100644 --- a/documentation/configuration-utils/_tcp.config.json +++ b/documentation/configuration-utils/_tcp.config.json @@ -9,7 +9,8 @@ }, "line.tcp.net.connection.limit": { "default": "256", - "description": "The maximum number permitted for simultaneous connections to the server. This value is intended to control server memory consumption." + "description": "The maximum number permitted for simultaneous connections to the server. This value is intended to control server memory consumption.", + "reloadable": true }, "line.tcp.net.connection.timeout": { "default": "300000", @@ -115,4 +116,4 @@ "default": "true", "description": "Enable or disable Access Control List (ACL) authentication for InfluxDB Line Protocol over TCP. Enterprise only." } -} +} \ No newline at end of file diff --git a/documentation/configuration.md b/documentation/configuration.md index 7cf91cff2..41c6a97a4 100644 --- a/documentation/configuration.md +++ b/documentation/configuration.md @@ -76,7 +76,7 @@ described below: :::note QuestDB applies these configuration changes on startup and a running instance -must be restarted in order for configuration changes to take effect +must be restarted in order for configuration changes to take effect. ::: @@ -93,6 +93,27 @@ shared.worker.count=5 export QDB_SHARED_WORKER_COUNT=5 ``` +## Reloadable settings + +Certain configuration settings can be reloaded without having to restart +the server. To reload a setting, edit its value in the `server.conf` file +and then run the `reload_config` SQL function: + +```questdb-sql title="Reload server configuration" +SELECT reload_config(); +``` + +If the value was reloaded successfully, the `reload_config` function returns +`true` and a message is printed to the server log: + +``` +2025-01-02T09:52:40.833848UTC I i.q.DynamicPropServerConfiguration reloaded config option [update, key=http.net.connection.limit, old=100, new=200] +``` + +Each key has a `reloadable` property that indicates whether the key can be +reloaded. If yes, the `reload_config` function can be used to reload the +configuration. + ## Keys and default values This section lists the configuration keys available to QuestDB by topic or @@ -304,9 +325,15 @@ without causing the database to stop its startup sequence: These are usually setting deprecation warnings. Configuration errors can optionally cause the database to fail its startup. -| Property | Default | Description | -| ------------------------ | ------- | -------------------------------------------------------------- | -| config.validation.strict | false | When enabled, startup fails if there are configuration errors. | + _We recommended enabling strict validation._ @@ -316,11 +343,25 @@ QuestDB sends anonymous telemetry data with information about usage which helps us improve the product over time. We do not collect any personally-identifying information, and we do not share any of this data with third parties. -| Property | Default | Description | -| ------------------------ | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- | -| telemetry.enabled | true | Enable or disable anonymous usage metrics collection. | -| telemetry.hide.tables | false | Hides telemetry tables from `select * from tables()` output. As a result, telemetry tables will not be visible in the Web Console table view. | -| telemetry.queue.capacity | 512 | Capacity of the internal telemetry queue, which is the gateway of all telemetry events. This queue capacity does not require tweaking. | + ## Logging & Metrics diff --git a/documentation/reference/function/meta.md b/documentation/reference/function/meta.md index 3e40198c0..21aae1bdc 100644 --- a/documentation/reference/function/meta.md +++ b/documentation/reference/function/meta.md @@ -12,7 +12,7 @@ learning useful information about your instance, including: - [Attached, detached, or attachable](/docs/reference/sql/alter-table-attach-partition/) partitions - Partition storage size on disk -- Running sql commands +- Running SQL commands ## build @@ -478,7 +478,7 @@ SELECT size_pretty(sum(diskSize)) FROM table_partitions('my_table'); | 80.3 MB | ```questdb-sql title="Get active partition of a table" -SELECT * FROM table_partitions('my_table') WHERE active = true +SELECT * FROM table_partitions('my_table') WHERE active = true; ``` | index | partitionBy | name | minTimestamp | maxTimestamp | numRows | diskSize | diskSizeHuman | readOnly | active | attached | detached | attachable | @@ -501,7 +501,6 @@ Returns `string`. **Examples:** ```questdb-sql - SELECT version(); --The above equals to: @@ -540,7 +539,7 @@ Returns `boolean`. `true` if successful, `false` if unsuccessful. Simply pass table names as arguments to the function. ``` -SELECT hydrate_table_metadata('trades', 'trips') +SELECT hydrate_table_metadata('trades', 'trips'); ``` | hydrate_table_metadata | @@ -550,5 +549,46 @@ SELECT hydrate_table_metadata('trades', 'trips') If you want to re-read metadata for all user tables, simply use an asterisk: ``` -SELECT hydrate_table_metadata('*') +SELECT hydrate_table_metadata('*'); +``` + +## flush_query_cache() + +`flush_query_cache' invalidates cached query execution plans. + +**Arguments:** + +- `flush_query_cache()` does not require arguments. + +**Return value:** + +Returns `boolean`. `true` if successful, `false` if unsuccessful. + +**Examples:** + +```questdb-sql title="Flush cached query execution plans" +SELECT flush_query_cache(); +``` + +## reload_config() + +`reload_config' reloads server configuration file's contents (`server.conf`) +without server restart. The list of reloadable settings can be found +[here](/docs/configuration/#reloadable-settings). + +**Arguments:** + +- `reload_config()` does not require arguments. + +**Return value:** + +Returns `boolean`. `true` if any configuration properties were reloaded, `false` +if none were reloaded. + +**Examples:** + +Edit `server.conf` and run `reload_config`: + +```questdb-sql title="Reload server configuration" +SELECT reload_config(); ``` diff --git a/src/theme/ConfigTable/index.tsx b/src/theme/ConfigTable/index.tsx index ab3123544..3693e8b37 100644 --- a/src/theme/ConfigTable/index.tsx +++ b/src/theme/ConfigTable/index.tsx @@ -1,7 +1,13 @@ import ReactMarkdown from "react-markdown" type Props = { - rows: { [key: string]: { default: string; description: string } } + rows: { + [key: string]: { + default: string + description: string + reloadable?: boolean + } + } pick?: string[] } @@ -12,16 +18,18 @@ export const ConfigTable = ({ rows, pick }: Props) => { Property Default + Reloadable Description {Object.entries(rows) .filter(([key]) => (Array.isArray(pick) ? pick.includes(key) : true)) - .map(([key, { default: defaultValue, description }]) => ( + .map(([key, { default: defaultValue, description, reloadable }]) => ( {key} {defaultValue} + {reloadable ? "Yes" : "No"} {description}