# # PgCat config example. # # # General pooler settings [general] # What IP to run on, 0.0.0.0 means accessible from everywhere. host = "0.0.0.0" # Port to run on, same as PgBouncer used in this example. port = 6432 # How many connections to allocate per server. pool_size = 15 # Pool mode (see PgBouncer docs for more). # session: one server connection per connected client # transaction: one server connection per client transaction pool_mode = "transaction" # How long to wait before aborting a server connection (ms). connect_timeout = 5000 # How much time to give `SELECT 1` health check query to return with a result (ms). healthcheck_timeout = 1000 # For how long to ban a server if it fails a health check (seconds). ban_time = 60 # Seconds # # User to use for authentication against the server. [user] name = "sharding_user" password = "sharding_user" # # Shards in the cluster [shards] # Shard 0 [shards.0] # [ host, port ] servers = [ [ "127.0.0.1", 5432 ], [ "localhost", 5432 ], ] # Database name (e.g. "postgres") database = "shard0" [shards.1] # [ host, port ] servers = [ [ "127.0.0.1", 5432 ], [ "localhost", 5432 ], ] database = "shard1" [shards.2] # [ host, port ] servers = [ [ "127.0.0.1", 5432 ], [ "localhost", 5432 ], ] database = "shard2"