Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions documentation/configuration-utils/_cairo.config.json
Original file line number Diff line number Diff line change
@@ -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)."
Expand Down Expand Up @@ -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."
},
Expand Down Expand Up @@ -459,4 +463,4 @@
"default": "256k",
"description": "mmap sliding page size that TableWriter uses to append data for each column specifically for System tables."
}
}
}
14 changes: 9 additions & 5 deletions documentation/configuration-utils/_http.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,22 @@
},
"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",
"description": "How long the code accumulates incoming data chunks for column and delimiter analysis."
},
"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",
Expand All @@ -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",
Expand Down Expand Up @@ -215,4 +219,4 @@
"default": "HTTP/1.1",
"description": "Protocol version, other supported value is `HTTP/1.0`."
}
}
}
5 changes: 3 additions & 2 deletions documentation/configuration-utils/_iam.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -83,4 +84,4 @@
"default": "true",
"description": "Enables/disables authentication for the ILP over TCP endpoint only."
}
}
}
31 changes: 22 additions & 9 deletions documentation/configuration-utils/_postgres.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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
}
}
}
5 changes: 3 additions & 2 deletions documentation/configuration-utils/_tcp.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -115,4 +116,4 @@
"default": "true",
"description": "Enable or disable Access Control List (ACL) authentication for InfluxDB Line Protocol over TCP. Enterprise only."
}
}
}
59 changes: 50 additions & 9 deletions documentation/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

:::

Expand All @@ -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
Expand Down Expand Up @@ -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. |
<ConfigTable
rows={{
"config.validation.strict": {
default: "false",
description: "When enabled, startup fails if there are configuration errors.",
reloadable: false
}
}}
/>

_We recommended enabling strict validation._

Expand All @@ -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. |
<ConfigTable
rows={{
"telemetry.enabled": {
default: "true",
description: "Enable or disable anonymous usage metrics collection.",
reloadable: false
},
"telemetry.hide.tables": {
default: "false",
description: "Hides telemetry tables from `select * from tables()` output. As a result, telemetry tables will not be visible in the Web Console table view.",
reloadable: false
},
"telemetry.queue.capacity": {
default: "512",
description: "Capacity of the internal telemetry queue, which is the gateway of all telemetry events. This queue capacity does not require tweaking.",
reloadable: false
}
}}
/>

## Logging & Metrics

Expand Down
50 changes: 45 additions & 5 deletions documentation/reference/function/meta.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 |
Expand All @@ -501,7 +501,6 @@ Returns `string`.
**Examples:**

```questdb-sql

SELECT version();

--The above equals to:
Expand Down Expand Up @@ -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 |
Expand All @@ -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();
```
12 changes: 10 additions & 2 deletions src/theme/ConfigTable/index.tsx
Original file line number Diff line number Diff line change
@@ -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[]
}

Expand All @@ -12,16 +18,18 @@ export const ConfigTable = ({ rows, pick }: Props) => {
<tr>
<th>Property</th>
<th>Default</th>
<th>Reloadable</th>
<th>Description</th>
</tr>
</thead>
<tbody>
{Object.entries(rows)
.filter(([key]) => (Array.isArray(pick) ? pick.includes(key) : true))
.map(([key, { default: defaultValue, description }]) => (
.map(([key, { default: defaultValue, description, reloadable }]) => (
<tr key={key}>
<td className="property-cell">{key}</td>
<td>{defaultValue}</td>
<td>{reloadable ? "Yes" : "No"}</td>
<td>
<ReactMarkdown>{description}</ReactMarkdown>
</td>
Expand Down
Loading