Skip to content
Snippets Groups Projects

postgresql: add test for removing a snapshot having common branches with another snapshot

  1. Jun 06, 2024
    • Nicolas Dandrimont's avatar
      postgresql: do not remove shared entries in the `snapshot_branch` table · 751634c9
      Nicolas Dandrimont authored
      When deleting a snapshot, deletion removed the corresponding entries in
      the `snapshot_branch` table. These entries are shared between
      snapshots (e.g. all snapshots with a `HEAD` pointing to `refs/heads/main`
      share the same line in this table), and we don't keep a reverse index to
      efficiently remove orphan lines, so we just skip the removal altogether.
      
      Add a test to ensure that the corruption doesn't happen anymore.
      751634c9
Loading