Skip to content

chore: suggestion for Philip. #4223

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 20, 2025
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
70 changes: 70 additions & 0 deletions _partials/_timescaledb-config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import ConfigCloudSelf from "versionContent/_partials/_cloud_self_configuration.mdx";

Just as you can tune settings in $PG, $TIMESCALE_DB provides a number of configuration
settings that may be useful to your specific installation and performance needs. These can
also be set within the `postgresql.conf` file or as command-line parameters
when starting $PG.

## Query Planning and Execution

### `timescaledb.enable_chunkwise_aggregation (bool)`
If enabled, aggregations are converted into partial aggregations during query
planning. The first part of the aggregation is executed on a per-chunk basis.
Then, these partial results are combined and finalized. Splitting aggregations
decreases the size of the created hash tables and increases data locality, which
speeds up queries.

### `timescaledb.vectorized_aggregation (bool)`
Enables or disables the vectorized optimizations in the query executor. For
example, the `sum()` aggregation function on compressed chunks can be optimized
in this way.

### `timescaledb.enable_merge_on_cagg_refresh (bool)`

Set to `ON` to dramatically decrease the amount of data written on a continuous aggregate
in the presence of a small number of changes, reduce the i/o cost of refreshing a
[continuous aggregate][continuous-aggregates], and generate fewer Write-Ahead Logs (WAL). Only works for continuous aggregates that don't have compression enabled.

## Policies

### `timescaledb.max_background_workers (int)`

Max background worker processes allocated to TimescaleDB. Set to at least 1 +
the number of databases loaded with a TimescaleDB extension in a $PG
instance. Default value is 16.

<ConfigCloudSelf />

## Hypercore features

### `timescaledb.default_hypercore_use_access_method (bool)`

The default value for `hypercore_use_access_method` for functions that have this parameter. This function is in `user` context, meaning that any user can set it for the session. The default value is `false`.

## Administration

### `timescaledb.restoring (bool)`

Set TimescaleDB in restoring mode. It is disabled by default.

### `timescaledb.license (string)`

Change access to features based on the TimescaleDB license in use. For example,
setting `timescaledb.license` to `apache` limits TimescaleDB to features that
are implemented under the Apache 2 license. The default value is `timescale`,
which allows access to all features.

### `timescaledb.telemetry_level (enum)`

Telemetry settings level. Level used to determine which telemetry to
send. Can be set to `off` or `basic`. Defaults to `basic`.

### `timescaledb.last_tuned (string)`

Records last time `timescaledb-tune` ran.

### `timescaledb.last_tuned_version (string)`

Version of `timescaledb-tune` used to tune when it runs.

[continuous-aggregates]: /use-timescale/:currentVersion:/continuous-aggregates/
13 changes: 13 additions & 0 deletions _partials/_timescaledb-gucs.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@

IAIN: Can we update the structure to follow the same format as the other API ref please. For example:

| Name | Type | Default | Required | Description |
| -- | -- | -- |---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `auto_sparse_indexes` | `BOOLEAN` |`&ts_guc_auto_sparse_indexes` (Don't think this is resolving correctly) | ✖ | Set to `true` to create [sparse indexes][sparse-indexes] on the $HYPERTABLE columns used as index keys when a chunk is converted to the columnstore. You must enable `auto_sparse_indexes` before the chunk is converted. |


IAIN: current version below

| Name | Type | Short Description | Short Description | Value |
| --- | --- | --- | --- | --- |
| `auto_sparse_indexes` | `BOOLEAN` | Create sparse indexes on compressed chunks | The hypertable columns that are used as index keys will have suitable sparse indexes when compressed. Must be set at the moment of chunk compression | `&ts_guc_auto_sparse_indexes` |
Expand Down Expand Up @@ -57,3 +67,6 @@
| `max_tuples_decompressed_per_dml_transaction` | `INTEGER` | The max number of tuples that can be decompressed during an ""INSERT | UPDATE | `" If the number of tuples exceeds this value` |
| `restoring` | `BOOLEAN` | Enable restoring mode for timescaledb | In restoring mode all timescaledb internal hooks are disabled. This mode is required for restoring logical dumps of databases with timescaledb. | `false` |
| `telemetry_level` | `ENUM` | Telemetry settings level | Level used to determine which telemetry to send | `TELEMETRY_DEFAULT` |


[sparse-indexes]: /use-timescale/:currentVersion:/schema-management/indexing/#best-practices-for-indexing
15 changes: 0 additions & 15 deletions api/configuration.md

This file was deleted.

13 changes: 13 additions & 0 deletions api/configuration/gucs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: Grand Unified Configuration (GUC) parameters
excerpt: Optimize the behavior of TimescaleDB using Grand Unified Configuration (GUC) parameters
keywords: [GUC, Configuration]
---

import TsdbGucsList from "versionContent/_partials/_timescaledb-gucs.mdx";

# Grand Unified Configuration (GUC) parameters

You use the following Grand Unified Configuration (GUC) parameters to optimize the behavior of your $SERVICE_LONG.

<TsdbGucsList />
17 changes: 17 additions & 0 deletions api/configuration/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: Service configuration
excerpt: Use the default PostgreSQL server configuration settings for your Tiger Cloud service, or customize them as needed
keywords: [configure]
products: [self_hosted, cloud]
---

# $SERVICE_LONG configuration

$SERVICE_LONG use the default $PG server configuration settings. You can optimize your $SERVICE_SHORT configuration
using the following $TIMESCALE_DB and Grand Unified Configuration (GUC) parameters.

* [$TIGER_POSTGRES configuration and tuning][tigerpostgres-config]
* [Grand Unified Configuration (GUC) parameters][gucs]

[tigerpostgres-config]: /api/:currentVersion:/configuration/tiger-postgres/
[gucs]: /api/:currentVersion:/configuration/gucs/
20 changes: 20 additions & 0 deletions api/configuration/tiger-postgres.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: Tiger Postgres configuration and tuning
excerpt: Configure the Tiger Postgres settings related to policies, query planning and execution, distributed
hypertables, and
administration
products: [cloud]
keywords: [configuration, settings]
tags: [tune]
---

import TimescaleDBConfig from "versionContent/_partials/_timescaledb-config.mdx";
import MultiNodeDeprecation from "versionContent/_partials/_multi-node-deprecation.mdx";

# $TIGER_POSTGRES configuration and tuning

Just as you can tune settings in $PG, $TIGER_POSTGRES provides a number of configuration
settings that may be useful to your specific installation and performance needs.

<TimescaleDBConfig />

13 changes: 0 additions & 13 deletions api/gucs.md

This file was deleted.

14 changes: 13 additions & 1 deletion api/page-index/page-index.js
Original file line number Diff line number Diff line change
Expand Up @@ -555,8 +555,20 @@ module.exports = [
],
},
{
title: "Service configuration",
href: "configuration",
excerpt: "Configure PostgreSQL and TimescaleDB",
children: [
{
title: "Tiger Postgres configuration",
href: "tiger-postgres",
excerpt: "Configure PostgreSQL and TimescaleDB",
},
{
title: "Grand Unified Configuration (GUC) parameters",
href: "gucs",
excerpt: "Change the behaviour of TimescaleDB using GUCs",
},
],
},
{
title: "Administration Functions",
Expand Down
73 changes: 6 additions & 67 deletions self-hosted/configuration/timescaledb-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,51 +6,17 @@ keywords: [configuration, settings]
tags: [tune]
---

import TimescaleDBConfig from "versionContent/_partials/_timescaledb-config.mdx";
import MultiNodeDeprecation from "versionContent/_partials/_multi-node-deprecation.mdx";
import ConfigCloudSelf from "versionContent/_partials/_cloud_self_configuration.mdx";

# TimescaleDB configuration and tuning
# $TIGER_POSTGRES configuration and tuning

Just as you can tune settings in PostgreSQL, TimescaleDB provides a number of configuration
Just as you can tune settings in $PG, $TIMESCALE_DB provides a number of configuration
settings that may be useful to your specific installation and performance needs. These can
also be set within the `postgresql.conf` file or as command-line parameters
when starting PostgreSQL.
when starting $PG.

## Query Planning and Execution

### `timescaledb.enable_chunkwise_aggregation (bool)`
If enabled, aggregations are converted into partial aggregations during query
planning. The first part of the aggregation is executed on a per-chunk basis.
Then, these partial results are combined and finalized. Splitting aggregations
decreases the size of the created hash tables and increases data locality, which
speeds up queries.

### `timescaledb.vectorized_aggregation (bool)`
Enables or disables the vectorized optimizations in the query executor. For
example, the `sum()` aggregation function on compressed chunks can be optimized
in this way.

### `timescaledb.enable_merge_on_cagg_refresh (bool)`

Set to `ON` to dramatically decrease the amount of data written on a continuous aggregate
in the presence of a small number of changes, reduce the i/o cost of refreshing a
[continuous aggregate][continuous-aggregates], and generate fewer Write-Ahead Logs (WAL). Only works for continuous aggregates that don't have compression enabled.

## Policies

### `timescaledb.max_background_workers (int)`

Max background worker processes allocated to TimescaleDB. Set to at least 1 +
the number of databases loaded with a TimescaleDB extension in a PostgreSQL
instance. Default value is 16.

<ConfigCloudSelf />

## Hypercore features

### `timescaledb.default_hypercore_use_access_method (bool)`

The default value for `hypercore_use_access_method` for functions that have this parameter. This function is in `user` context, meaning that any user can set it for the session. The default value is `false`.
<TimescaleDBConfig />

## Distributed hypertables

Expand Down Expand Up @@ -105,37 +71,10 @@ can be either `copy`, `cursor`, or `auto`. The default is `auto`.

Specifies the path used to search user certificates and keys when
connecting to data nodes using certificate authentication. Defaults to
`timescaledb/certs` under the PostgreSQL data directory.
`timescaledb/certs` under the $PG data directory.

### `timescaledb.passfile (string)` [

Specifies the name of the file where passwords are stored and when
connecting to data nodes using password authentication.

## Administration

### `timescaledb.restoring (bool)`

Set TimescaleDB in restoring mode. It is disabled by default.

### `timescaledb.license (string)`

Change access to features based on the TimescaleDB license in use. For example,
setting `timescaledb.license` to `apache` limits TimescaleDB to features that
are implemented under the Apache 2 license. The default value is `timescale`,
which allows access to all features.

### `timescaledb.telemetry_level (enum)`

Telemetry settings level. Level used to determine which telemetry to
send. Can be set to `off` or `basic`. Defaults to `basic`.

### `timescaledb.last_tuned (string)`

Records last time `timescaledb-tune` ran.

### `timescaledb.last_tuned_version (string)`

Version of `timescaledb-tune` used to tune when it runs.

[continuous-aggregates]: /use-timescale/:currentVersion:/continuous-aggregates/