Skip to content

Cascading Asynchronous Catalog Deletion #3008

Open

Description

@adam-christian-software

Is your feature request related to a problem? Please describe.

On Slack, a user mentioned that they were having trouble cleaning up an unused catalog. They had deleted tables and namespaces, but forgot to delete catalog roles. They got into this state because they change their underlying object store (GCS) and they wanted to just start with a fresh new catalog.

Describe the solution you'd like

An extension to the Polaris Management REST API to allow for a catalog and all its related content to be deleted in the background.
As @snazy noted:

  1. This must also be resumable because the metastore DB might stall or fail.
  2. The catalog must not be usable for others while it is being purged. This requires a catalog-state-management and a corresponding catalog-state-machine.

Describe alternatives you've considered

  1. Delete all the catalog entities one-by-one

Additional context

  1. Eric Maynard mentioned that there was some vestigial code related to CASCADE (e.g. CLEANUP_ON_CATALOG_DROP).
  2. The maintenance service project / asynchronous task execution is related to this.
  3. As @flyrain noted, we will also need to consider polices that attached to entities in different catalogs.

Activity

  1. flyrain commented on Nov 7, 2025

    @flyrain
    Contributor

    Thanks a lot for filing this one. Some thoughts:
    Cascading deletion doesn’t necessarily need to be asynchronous. Async execution is only required when tables are dropped with purge, since that may involve time-consuming storage cleanup.

    We will also need to consider polices that attached to entities in different catalogs. cc @HonahX

  2. snazy commented on Nov 10, 2025

    @snazy
    Member

    Thanks @adam-christian-software, this is a request for a missing functionality in Polaris, so the request for this is totally legit and valid!

    Catalogs can have a huge amount of namespaces, catalog-roles and tables and views.
    Just considering that quite an amount of backend database operations is necessary for this use case, and that database operations may stall or block (e.g. tx sync) or fail (e.g. tx deadlock), a whole catalog-purge operation has to be asynchronous and also resumable.
    On top, as a drop-catalog-purge can easily take a long time, the catalog must not be usable for others while it is being purged. This requires a catalog-state-management and a corresponding catalog-state-machine.

    Cross-catalog references are risky, and this use case is one example why. Circular cross-catalog references would be a blocker.

  3. github-actions commented on Feb 15, 2026

    @github-actions

    This issue is stale because it has been open 30 days with no activity. Remove stale label or comment if you think it's still relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementstale

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions