Skip to content

Backport #104416 to 26.4: Hide MySQL and PostgreSQL databases from system.tables by default - #106046

Merged
pamarcos merged 5 commits into
26.4from
backport/26.4/104416
Jun 1, 2026
Merged

pamarcos merged 5 commits into
26.4from
backport/26.4/104416

Conversation

@robot-ch-test-poll2

@robot-ch-test-poll2 robot-ch-test-poll2 commented May 28, 2026 •

Copy link
Copy Markdown
Contributor

Original pull-request #104416
Cherry-pick pull-request #106036

This pull-request is a last step of an automated backporting.
Treat it as a standard pull-request: look at the checks and resolve conflicts.
Merge it only if you intend to backport changes to the target branch, otherwise just close it.

The PR source

The PR is created in the CI job

Version info

  • Merged into: 26.4.4.24

@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-backport Changes, backported to release branch. Do not use manually - automated use only! label May 28, 2026
@clickhouse-gh

clickhouse-gh Bot commented May 28, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [BackportPR], commit [2f9f641]

Summary: ✅

@pamarcos

Copy link
Copy Markdown
Member

@copilot Tackle the build failures. Also make sure only the new setting from the original PR is added to SettingsHistory

@CLAassistant

CLAassistant commented May 28, 2026 •

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ pamarcos
❌ Copilot
You have signed the CLA already but the status is still pending? Let us recheck it.

Copilot AI commented May 28, 2026

Copy link
Copy Markdown
Contributor

@copilot Tackle the build failures. Also make sure only the new setting from the original PR is added to SettingsHistory

Addressed in e0fd676. Removed the stale isDatalakeCatalog call causing the build failure and kept SettingsChangesHistory limited to the new show_remote_databases_in_system_tables setting.

Copilot AI requested a review from pamarcos May 28, 2026 17:06
Remove accidentally backported `allow_experimental_geo_types_in_iceberg` so
`02995_new_settings_history` only sees the setting from PR #104416.

Update `test_database_glue/test_system_tables` to match the intended
`system.databases` behavior: remote database names are local metadata and stay
visible while table and column enumeration stays hidden by default.

PR: #106046
@pamarcos

Copy link
Copy Markdown
Member

@copilot Are you sure about this chunk?

assert int(node.query(f"SELECT count() FROM system.databases WHERE name = '{CATALOG_NAME}'").strip()) == 1

I would think that the previous == 0 tests precisely that without the flag set to true, no database should be reported. Review this and the rest of the tests to tackle it so that it's consistent.

Copilot AI commented May 29, 2026

Copy link
Copy Markdown
Contributor

@copilot Are you sure about this chunk?

...

Addressed in 5143585. I rechecked the original PR behavior: system.databases intentionally still shows remote database names because that is local metadata; the setting gates system.tables, system.columns, and system.completions enumeration. I updated the Glue tests to use show_remote_databases_in_system_tables consistently and made the system.databases true/false expectations explicit.

Keep `test_database_glue` using the existing data-lake setting alias as on master. The only semantic adjustment is the master expectation for `system.databases`: listing a data lake catalog database name is local metadata, so it remains visible when `show_data_lake_catalogs_in_system_tables` is false.

Addresses #106046 (comment).
@pamarcos

Copy link
Copy Markdown
Member

Rechecked against the original PR #104416 and current master. The original PR does not change test_database_glue, and master already documents this behavior there: system.databases always shows the data lake catalog database because listing the database name is local metadata and does not enumerate remote table contents.

So the == 1 expectation is correct for system.databases; the default-hidden behavior remains covered for system.tables, system.columns, and system.completions, where remote enumeration can happen.

I pushed 2f9f641, which keeps the Glue test aligned with master: it uses the existing show_data_lake_catalogs_in_system_tables alias in that test and restores the explicit false == 1 system.databases expectation/comment. No implementation behavior was changed.

Verification:

  • Built clickhouse: build/build_pr106046_system_databases_fix.log
  • Stateless 04210_show_remote_databases_in_system_tables: 12/12 passed, ~51s
  • Integration test_database_glue/test.py::test_system_tables: passed
  • Style: check_cpp.sh and various_checks.sh passed from a clean temporary worktree

@alexey-milovidov alexey-milovidov added the close in a month if not active This will be closed in case of no information label May 31, 2026
@pamarcos
pamarcos merged commit 16de1f2 into 26.4 Jun 1, 2026
34 checks passed
@pamarcos
pamarcos deleted the backport/26.4/104416 branch June 1, 2026 10:10
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
Remove accidentally backported `allow_experimental_geo_types_in_iceberg` so
`02995_new_settings_history` only sees the setting from PR ClickHouse#104416.

Update `test_database_glue/test_system_tables` to match the intended
`system.databases` behavior: remote database names are local metadata and stay
visible while table and column enumeration stays hidden by default.

PR: ClickHouse#106046
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
Keep `test_database_glue` using the existing data-lake setting alias as on master. The only semantic adjustment is the master expectation for `system.databases`: listing a data lake catalog database name is local metadata, so it remains visible when `show_data_lake_catalogs_in_system_tables` is false.

Addresses ClickHouse#106046 (comment).
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
…4416

Backport ClickHouse#104416 to 26.4: Hide MySQL and PostgreSQL databases from system.tables by default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

close in a month if not active This will be closed in case of no information pr-backport Changes, backported to release branch. Do not use manually - automated use only!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants