From 03a02c9b36f0c79bb3bb297d65188a42c2f0ce13 Mon Sep 17 00:00:00 2001 From: gamandeepsingh Date: Sat, 4 Jul 2026 15:21:18 +0530 Subject: [PATCH] fix: drop accounts_to_delete before recreating to prevent crash on second snapshot run --- crates/snapshot/src/db/create_accounts_to_delete_table.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/snapshot/src/db/create_accounts_to_delete_table.sql b/crates/snapshot/src/db/create_accounts_to_delete_table.sql index 186c19a..21ea5fc 100644 --- a/crates/snapshot/src/db/create_accounts_to_delete_table.sql +++ b/crates/snapshot/src/db/create_accounts_to_delete_table.sql @@ -7,6 +7,8 @@ -- with the accounts to delete (which are the accounts that have multiple -- versions in the temp_snapshot_account_versions table, and this table will -- contain all the older versions of the account) +DROP TABLE IF EXISTS accounts_to_delete; + CREATE UNLOGGED TABLE accounts_to_delete AS SELECT owner,