Skip to content

fix: indexer crash-loops on "relation already exists" during self-healing - #26

Open
gamandeepsingh wants to merge 1 commit into
solana-rpc:mainfrom
gamandeepsingh:fix/accounts-to-delete-crash-loop
Open

fix: indexer crash-loops on "relation already exists" during self-healing#26
gamandeepsingh wants to merge 1 commit into
solana-rpc:mainfrom
gamandeepsingh:fix/accounts-to-delete-crash-loop

Conversation

@gamandeepsingh

Copy link
Copy Markdown

fix: indexer crash-loops on "relation already exists" during self-healing

create_accounts_to_delete_table.sql ran a plain CREATE UNLOGGED TABLE accounts_to_delete AS SELECT ... with no preceding drop. On the first snapshot run the table is created and never cleaned up within the process. When self-healing triggers a second snapshot run, the same CREATE fires again → relation "accounts_to_delete" already exists → panic → process exits → full re-bootstrap → next gap → same panic. Unbreakable crash loop.

Fixed by prepending DROP TABLE IF EXISTS accounts_to_delete to the SQL, mirroring the existing cleanup pattern used by temp_closed_accounts.

Closes #18

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Indexer crash-loops on "relation \"accounts_to_delete\" already exists" when a gap triggers a second snapshot run

1 participant