pgcat fails to start if any of servers is unavailable
vthriller opened this issue · 4 comments
vthriller commented
Describe the bug
Subj. pgcat exits with
2023-11-14T04:19:57.260026Z ERROR pgcat::server: Could not connect to server: Connection refused (os error 111)
and error code 78. One faulty server is enough to bring the whole thing down.
To Reproduce
pgcat.toml
[general]
host = "0.0.0.0"
port = 6432
admin_username = "pgcat"
admin_password = "pgcat"
[pools.pool1.users.0]
username = "user"
password = "user"
pool_size = 2
min_pool_size = 1
pool_mode = "transaction"
[pools.pool1.shards.0]
servers = [
["127.0.0.1", 55432, "replica"],
["127.0.0.1", 55433, "replica"],
]
database = "postgres"
[pools.pool2.users.0]
username = "user"
password = "user"
pool_size = 2
min_pool_size = 1
pool_mode = "transaction"
[pools.pool2.shards.0]
servers = [
["127.0.0.1", 55434, "replica"],
["127.0.0.1", 55435, "replica"],
]
database = "postgres"
postgres -D pg1 -p 55432 -k /tmp &
postgres -D pg2 -p 55433 -k /tmp &
postgres -D pg3 -p 55434 -k /tmp &
#postgres -D pg4 -p 55435 -k /tmp &
./target/release/pgcat ./pgcat.toml
Expected behavior
pgcat starts normally.
pgcat version
1.1.1
vthriller commented
(BTW, your bug template is unfit for the project. Screenshots? Smartphone browser version?)
levkk commented
validate_config = false
vthriller commented
validate_config = false
Please update sample config file and/or document this in some other way, it's not mentioned anywhere as of 998cc16.
levkk commented
PR welcome.