Support XDG-compliant locations for the ClickHouse Client config file#90306
Merged
thevar1able merged 2 commits intoClickHouse:masterfrom Nov 19, 2025
rainac1:feature/89882-xdg-client-config-path
Merged
Support XDG-compliant locations for the ClickHouse Client config file#90306thevar1able merged 2 commits intoClickHouse:masterfrom rainac1:feature/89882-xdg-client-config-path
thevar1able merged 2 commits intoClickHouse:masterfrom
rainac1:feature/89882-xdg-client-config-path
Conversation
Contributor
|
Workflow [PR], commit [513ac9a] Summary: ❌
|
thevar1able
approved these changes
Nov 19, 2025
Member
Merged
via the queue into
ClickHouse:master
with commit Nov 19, 2025
4096d0d
126 of 132 checks passed
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Add support for loading ClickHouse Client configuration from XDG Base Directory paths (e.g.,
~/.config/clickhouse/config.xml) in addition to the legacy~/.clickhouse-client/location. Resolves #89882Documentation entry for user-facing changes
Details
Resolves #89882.
This PR makes ClickHouse Client compliant with the XDG Base Directory specification.
Configuration Search Order
The client now searches for configuration files in the following order of precedence:
./.clickhouse-client/config.xml(Unchanged)$XDG_CONFIG_HOME/clickhouse/config.xml(defaults to~/.config/clickhouse/config.xmlif the env var is not set)~/.clickhouse-client/config.xml(Unchanged, for backward compatibility)/etc/clickhouse-client/config.xml(Unchanged)Related Changes
I have also submitted a corresponding PR to the
chdigsubmodule to support XDG paths there as well.Note that this PR does not update the submodule pointer yet.