-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
prune active set from ballot blob (#5032)
## Motivation Closes #4985 ## Changes - actually prune active set from ballot blobs in db - use a empty migration to facilitate the pruning. we only want to prune/vacuum/checkpoint once per software upgrade the code allow any upgrade from migration <=4 to 5 to - extract active set from ballots - prune active set from blob - vacuum and checkpoint the final size of the state should be < 1GB
- Loading branch information
1 parent
0b084e9
commit 9a8e957
Showing
6 changed files
with
11 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
CREATE INDEX ballots_by_atx_by_layer ON ballots (atx, layer asc); | ||
CREATE INDEX ballots_by_atx_by_layer ON ballots (atx, layer asc); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
DELETE FROM proposals; | ||
DELETE FROM proposal_transactions; | ||
UPDATE certificates SET cert = NULL WHERE layer < 19000; | ||
UPDATE certificates SET cert = NULL WHERE layer < 20000; |