solana-accountsdb-plugin-postgres
solana-accountsdb-plugin-postgres copied to clipboard
Removing forked writes
This is related to: https://github.com/lijunwangs/solana-postgres-rpc-server/issues/3
When slots that were on forks end up being skipped, we're storing inconsistent state data in the accounts
table.
Proposed solution:
Add a trigger that will delete entries from accounts
table which are on status processed
whenever a new slot is rooted. Something like:
delete from accounts where slot < new_rooted_slot and slot.status=processed'
For this to work it would require that previous entries exists in accounts_audit
table.