Skip to content

Upgrade removes old database folders that hold no database #5117

Open

Description

@kaidaguerre

What we want

After an upgrade of the embedded database, older version folders under the install directory's db/ folder stay on disk for ever: folders whose data was moved or copied into the new version, folders with programs but no database, and folders left by failed upgrades. Each is roughly the size of a PostgreSQL install. We want those that no longer hold a database removed after a successful upgrade.

Found in review of #5103 (PR #5114), which now ignores these folders when choosing what to carry over but does not remove them.

Why it matters

Every upgrade leaves another few hundred megabytes behind in each user's install directory, with nothing telling them it is safe to delete.

Success criteria

  • After a successful upgrade, older version folders that hold no database are gone from the install directory.
  • An older version folder that still holds a database is never deleted automatically, whatever else happens during the upgrade.
  • A failed upgrade removes nothing.
  • Tests cover all three of the above.

Out of scope

  • Removing older folders that still hold a database, even after a successful upgrade.

Activity

  1. added theissue type on Nov 11, 2026
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

    agent:readyReady for the autonomous loop to pick up

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions