Skip to content

Add hard delete database #26262

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
pauldix opened this issue Apr 14, 2025 · 2 comments
Open

Add hard delete database #26262

pauldix opened this issue Apr 14, 2025 · 2 comments
Assignees
Labels

Comments

@pauldix
Copy link
Member

pauldix commented Apr 14, 2025

Currently, database deletes are soft deletes. They mark the database as deleted in the Catalog and rename it so that the name can be used, but keep the underlying files around.

Databases marked for deletion should be hard deleted after some period of time. Let's set this to 72 hours. Once a database has been soft deleted, 72 hours later, a background task should remove all underlying table files and then remove the database and its schema from the Catalog.

We should also have an API and CLI to run this process earlier for a specific database. I.e. a user deletes a database. Then they can make another call to have that database hard deleted. The follow up call should use the database ID as an identifier, not the name.

@peterbarnett03
Copy link
Contributor

Should be worked in tandem with #26156 possibly

@stuartcarnie
Copy link
Contributor

As noted in #26156:

User must have an option available to them to do a hard delete (CLI option). This can be as a flag/option of the existing delete table command or as a new command (former preferred).

For consistency, do we want this flag for delete database too, so the user can perform the whole step in a single command?

Seems like --permanent would be an appropriate name for the flag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants