Skip to content

Document that the Remote engines take SETTINGS after the engine definition - #112884

Merged
alexey-milovidov merged 3 commits into
masterfrom
docs-remote-engine-settings-clause
Aug 3, 2026
Merged

alexey-milovidov merged 3 commits into
masterfrom
docs-remote-engine-settings-clause

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Aug 1, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #112670, addressing the review finding that was left open there (the author asked to hand it over after the merge).

That PR added a trailing SETTINGS clause to the arguments of the remote, remoteSecure, cluster and clusterAllReplicas table functions. The remote page states that "the same parameters can be used with the Remote and RemoteSecure table engines", which after that change implied that ENGINE = Remote(..., SETTINGS skip_unavailable_shards = 1) is valid. It is not: engine arguments are parsed by ParserStorage in the non-table-function mode, and registerStorageRemote reads the settings from storage_def->settings.

CREATE TABLE t1 ENGINE = Remote('127.0.0.1', system, one, SETTINGS skip_unavailable_shards = 1);
-- Code: 62. DB::Exception: Syntax error: failed at position 68 (skip_unavailable_shards)

CREATE TABLE t2 ENGINE = Remote('127.0.0.1', system, one) SETTINGS skip_unavailable_shards = 1;
-- Ok.

The engines already accept exactly the same settings, only after the engine definition, so this documents the difference on both sides - the table-function page and the Remote/RemoteSecure engine description - rather than adding a second syntax to the engines. The engine form was not covered by a test; one is added.

Related: #112670
Related: #112653

Changelog category (leave one):

  • Documentation (changelog entry is not required)

Version info

  • Merged into: 26.8.1.653 (included in 26.8 and later)

…efinition

Follow-up to #112670, which added a
trailing `SETTINGS` clause to the arguments of the `remote`, `remoteSecure`,
`cluster` and `clusterAllReplicas` table functions.

The `remote` documentation states that the same parameters can be used with the
`Remote` and `RemoteSecure` table engines, so after that change it implied that
`ENGINE = Remote(..., SETTINGS skip_unavailable_shards = 1)` is valid. It is not:
engine arguments are parsed by `ParserStorage` in the non-table-function mode and
`registerStorageRemote` reads the settings from `storage_def->settings`, so the
inner clause is a syntax error. The engines take exactly the same settings, but
after the engine definition:

```sql
CREATE TABLE t ENGINE = Remote('127.0.0.1', system, one) SETTINGS skip_unavailable_shards = 1
```

Document the difference on both sides - the table-function page and the
`Remote`/`RemoteSecure` engine description - instead of adding a second syntax to
the engines, and add a test for the engine form, which was not covered.
@alexey-milovidov
alexey-milovidov requested a review from a team as a code owner August 1, 2026 08:25
@clickhouse-gh

clickhouse-gh Bot commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [2634410]

Summary: ✅


AI Review

Summary

This PR corrects the user-facing documentation for Remote / RemoteSecure so the SETTINGS clause is shown in the only form the engines actually accept, and it adds a focused stateless test that exercises that engine syntax and its persistence across DETACH / ATTACH. I did not find any remaining correctness, documentation-surface, or coverage gaps in the current head; the previously open bot thread is fixed in code now.

Final Verdict

✅ Approve. No new findings.

@clickhouse-gh clickhouse-gh Bot added the pr-documentation Documentation PRs for the specific code PR label Aug 1, 2026
@mintlify

mintlify Bot commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
ClickHouse-docs 🟢 Ready View Preview Aug 1, 2026, 8:53 AM

Comment thread src/Storages/StorageDistributed.cpp Resolved
…ngine docs block

The `Documentation{}` block registered for the `Distributed` engine embeds its
own copy of the `### Remote and RemoteSecure engines` section, which is the
surface actually published for that engine. It still showed
`ENGINE = Remote(...)` without the trailing `[SETTINGS ...]` and did not explain
that the `remote` and `remoteSecure` table functions take `SETTINGS` inside
their argument list instead, contradicting the rest of this change.
@clickhouse-gh

clickhouse-gh Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 86.60% 86.50% -0.10%
Functions 91.90% 91.90% +0.00%
Branches 78.80% 78.70% -0.10%

Changed lines: Changed C/C++ lines covered: 37/37 (100.00%) · Uncovered code

Full report · Diff report

@alexey-milovidov alexey-milovidov left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alexey-milovidov alexey-milovidov self-assigned this Aug 2, 2026
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Aug 2, 2026
Merged via the queue into master with commit 508dbed Aug 3, 2026
352 of 353 checks passed
@alexey-milovidov
alexey-milovidov deleted the docs-remote-engine-settings-clause branch August 3, 2026 00:04
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-synced-to-cloud The PR is synced to the cloud repo label Aug 3, 2026

This branch was successfully deployed

1 active deployment
staging - docs — 26344105 Deployed Aug 2, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-documentation Documentation PRs for the specific code PR pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants