Skip to content

Commit

Permalink
services/horizon: Add migration to tighten up the trade aggregation a…
Browse files Browse the repository at this point in the history
…utovac settings (#4412)

* Add migration to tighten up the trade aggregation autovac settings

* update changelog

* gogenerate.sh
  • Loading branch information
Paul Bellamy authored May 27, 2022
1 parent 6af10a1 commit 97da5a5
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
2 changes: 2 additions & 0 deletions services/horizon/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ file. This project adheres to [Semantic Versioning](http://semver.org/).

## Unreleased

- Run postgres autovacuum on `history_trades_60000` table more frequently
([4412](https://github.com/stellar/go/pull/4412)).
- Querying claimable balances has been optimized ([4385](https://github.com/stellar/go/pull/4385)).
- Querying trade aggregations has been optimized ([4389](https://github.com/stellar/go/pull/4389)).
- Postgres connections for non ingesting Horizon instances are now configured to timeout on long running queries / transactions ([4390](https://github.com/stellar/go/pull/4390)).
Expand Down
23 changes: 23 additions & 0 deletions services/horizon/internal/db2/schema/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
-- +migrate Up

alter table history_trades_60000 set (
autovacuum_vacuum_scale_factor = 0.05,
autovacuum_analyze_scale_factor = 0.025
);

-- +migrate Down

alter table history_trades_60000 set (
autovacuum_vacuum_scale_factor = 0.1,
autovacuum_analyze_scale_factor = 0.5
);

0 comments on commit 97da5a5

Please sign in to comment.