Statement timeout + replica imbalance fix (#122)

* Statement timeout

* send error message too

* Correct error messages

* Fix replica inbalance

* disable stmt timeout by default

* Redundant mark_bad

* revert healthcheck delay

* tests

* set it to 0

* reload config again
This commit is contained in:
Lev Kokotov
2022-08-13 13:45:58 -07:00
committed by GitHub
parent 52303cc808
commit 3285006440
6 changed files with 77 additions and 7 deletions

View File

@@ -92,10 +92,14 @@ password = "sharding_user"
# is the sum of pool_size across all users.
pool_size = 9
# Maximum query duration. Dangerous, but protetcts against DBs that died and a non-obvious way.
statement_timeout = 0
[pools.sharded_db.users.1]
username = "other_user"
password = "other_user"
pool_size = 21
statement_timeout = 15000
# Shard 0
[pools.sharded_db.shards.0]
@@ -133,6 +137,7 @@ sharding_function = "pg_bigint_hash"
username = "simple_user"
password = "simple_user"
pool_size = 5
statement_timeout = 0
[pools.simple_db.shards.0]
servers = [