Repository navigation
Add SYSTEM UNLOAD DICTIONARY / DICTIONARIES commands - #96064
Closed
xiaohuanlin wants to merge 3 commits into
Closed
xiaohuanlin wants to merge 3 commits into
xiaohuanlin wants to merge 3 commits into
Conversation
Contributor
|
Workflow [PR], commit [bdfd7c9] Summary: ❌
|
Implement SYSTEM UNLOAD DICTIONARY and SYSTEM UNLOAD DICTIONARIES to release dictionary memory and reset to lazy-load state. Reuses SYSTEM_RELOAD_DICTIONARY access rights for consistency. Closes ClickHouse#93776
After rebase, resolveDictionaryName now takes (string, string) instead of (string, ContextPtr). Update unloadDictionary to use getCurrentDatabase().
xiaohuanlin
force-pushed
the
feature/system-unload-dictionary
branch
from
February 5, 2026 21:29
f77dbd8 to
bdfd7c9
Compare
1 task done
Contributor
|
Dear @Manerone, you haven't been active on this PR for 30 days. You will be unassigned. Will you continue working on it? If so, please feel free to reassign yourself. |
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
SYSTEM UNLOAD DICTIONARYandSYSTEM UNLOAD DICTIONARIEScommands to release dictionary memory without dropping the dictionary definition. Dictionaries will be reloaded lazily on next access.Documentation entry for user-facing changes
New SQL commands:
SYSTEM UNLOAD DICTIONARY [db.]name— unloads a specific dictionary from memory, releasing its data. The dictionary will be reloaded automatically on next query that accesses it.SYSTEM UNLOAD DICTIONARIES— unloads all loaded dictionaries.Motivation: When dictionaries consume significant memory but are only needed occasionally, users can free memory without dropping and recreating the dictionary. This was previously not possible — the only options were
DROP DICTIONARY(loses definition) or waiting for server restart.Reuses
SYSTEM_RELOAD_DICTIONARYaccess rights, so users with reload permissions can also unload.Example:
Closes #93776