-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autovacuum crypto_transfer, token_transfer, and transaction #1825
Merged
Merged
Changes from 2 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
948f95d
more frequent anti-wraparound autovacuum for crypto_transfer and toke…
xin-hedera bb83402
autovacuum transaction since there are index only scans on (payer_acc…
xin-hedera 0a4a2d3
Merge branch 'master' into autovacuum-insert-only-tables
xin-hedera 6bf4b1c
upgrade to timescale/timescaledb-ha:pg13-ts2.2-latest
xin-hedera 401e099
- increase timescaledb container shm size by setting sharedMemory.use…
xin-hedera 28c5cb9
fix test failure
xin-hedera 5dce57e
rename placeholders and sort properly
xin-hedera File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
...or-importer/src/main/resources/db/migration/v1/V1.37.0__autovacuum_insert_only_tables.sql
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
------------------- | ||
-- autovacuum insert-only tables more frequently to ensure most pages are visible for index-only scans | ||
-- prior to postgresql 13, this can be achieved by configuring a more aggressive anti-wraparound autovacuum | ||
------------------- | ||
|
||
alter table if exists crypto_transfer set ( | ||
autovacuum_freeze_max_age = 100000, | ||
autovacuum_freeze_table_age = 100000, | ||
autovacuum_freeze_min_age = 0, | ||
log_autovacuum_min_duration = 0 | ||
); | ||
|
||
alter table if exists token_transfer set ( | ||
autovacuum_freeze_max_age = 100000, | ||
autovacuum_freeze_table_age = 100000, | ||
autovacuum_freeze_min_age = 0, | ||
log_autovacuum_min_duration = 0 | ||
); | ||
|
||
alter table if exists transaction set ( | ||
autovacuum_freeze_max_age = 100000, | ||
autovacuum_freeze_table_age = 100000, | ||
autovacuum_freeze_min_age = 0, | ||
log_autovacuum_min_duration = 0 | ||
); |
25 changes: 25 additions & 0 deletions
25
...ror-importer/src/main/resources/db/migration/v2/V2.0.5__autovacuum_insert_only_tables.sql
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
------------------- | ||
-- autovacuum insert-only tables more frequently to ensure most pages are visible for index-only scans | ||
-- prior to postgresql 13, this can be achieved by configuring a more aggressive anti-wraparound autovacuum | ||
------------------- | ||
|
||
alter table if exists crypto_transfer set ( | ||
autovacuum_freeze_max_age = 100000, | ||
autovacuum_freeze_table_age = 100000, | ||
autovacuum_freeze_min_age = 0, | ||
log_autovacuum_min_duration = 0 | ||
); | ||
|
||
alter table if exists token_transfer set ( | ||
autovacuum_freeze_max_age = 100000, | ||
autovacuum_freeze_table_age = 100000, | ||
autovacuum_freeze_min_age = 0, | ||
log_autovacuum_min_duration = 0 | ||
); | ||
|
||
alter table if exists transaction set ( | ||
autovacuum_freeze_max_age = 100000, | ||
autovacuum_freeze_table_age = 100000, | ||
autovacuum_freeze_min_age = 0, | ||
log_autovacuum_min_duration = 0 | ||
); |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
Or if there's value to configurability you can add it as property in the
application.yaml
underspring.flyway.placeholders
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed both to repeatable migrations and added properties to spring.flyway.placeholders