Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Early-out on catalog errors to prevent GetDatabases#17865

Merged
Mytherin merged 5 commits intoduckdb:v1.3-ossivalisfrom
taniabogatsch:catalog-error
Jun 12, 2025
Merged

Early-out on catalog errors to prevent GetDatabases#17865
Mytherin merged 5 commits intoduckdb:v1.3-ossivalisfrom
taniabogatsch:catalog-error

Conversation

@taniabogatsch
Copy link
Contributor

CatalogErrorMaxSchemasSetting already allows limiting the number of schemas traversed to construct the did you mean part of an error message. However, with A LOT of attached databases, we would still call into db_manager.GetDatabases(context), causing a O(attached_databases) CatalogSet::Scan.

With this PR, setting SET catalog_error_max_schemas = 0 early-outs before scanning the catalog set.

@taniabogatsch taniabogatsch changed the base branch from main to v1.3-ossivalis June 10, 2025 13:55
Copy link
Collaborator

@Mytherin Mytherin left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

Instead of having an early-out specifically for max_schema_count = 0, maybe we can push the max_schema_count into the GetDatabases? Given each database has at least one schema we should never need to fetch more than max_schema_count databases.

@duckdb-draftbot duckdb-draftbot marked this pull request as draft June 11, 2025 10:36
@taniabogatsch taniabogatsch marked this pull request as ready for review June 11, 2025 10:44
@duckdb-draftbot duckdb-draftbot marked this pull request as draft June 12, 2025 08:48
@taniabogatsch taniabogatsch marked this pull request as ready for review June 12, 2025 08:48
@Mytherin Mytherin merged commit e3df4b0 into duckdb:v1.3-ossivalis Jun 12, 2025
51 of 52 checks passed
@Mytherin
Copy link
Collaborator

Thanks!

github-actions bot pushed a commit to duckdb/duckdb-r that referenced this pull request Jun 12, 2025
Early-out on catalog errors to prevent GetDatabases (duckdb/duckdb#17865)
github-actions bot added a commit to duckdb/duckdb-r that referenced this pull request Jun 12, 2025
Early-out on catalog errors to prevent GetDatabases (duckdb/duckdb#17865)

Co-authored-by: krlmlr <[email protected]>
@taniabogatsch taniabogatsch deleted the catalog-error branch June 12, 2025 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments