@@ -48,7 +48,7 @@ admin_password = "postgres"
48
48
# configs are structured as pool.<pool_name>
49
49
# the pool_name is what clients use as database name when connecting
50
50
# For the example below a client can connect using "postgres://sharding_user:sharding_user@pgcat_host:pgcat_port/sharded"
51
- [pools .sharded ]
51
+ [pools .postgres ]
52
52
# Pool mode (see PgBouncer docs for more).
53
53
# session: one server connection per connected client
54
54
# transaction: one server connection per client transaction
@@ -84,7 +84,7 @@ primary_reads_enabled = true
84
84
sharding_function = " pg_bigint_hash"
85
85
86
86
# Credentials for users that may connect to this cluster
87
- [pools .sharded .users .0 ]
87
+ [pools .postgres .users .0 ]
88
88
username = " postgres"
89
89
password = " postgres"
90
90
# Maximum number of server connections that can be established for this user
@@ -95,14 +95,8 @@ pool_size = 9
95
95
# Maximum query duration. Dangerous, but protects against DBs that died in a non-obvious way.
96
96
statement_timeout = 0
97
97
98
- [pools .sharded .users .1 ]
99
- username = " postgres"
100
- password = " postgres"
101
- pool_size = 21
102
- statement_timeout = 15000
103
-
104
98
# Shard 0
105
- [pools .sharded .shards .0 ]
99
+ [pools .postgres .shards .0 ]
106
100
# [ host, port, role ]
107
101
servers = [
108
102
[ " postgres" , 5432 , " primary" ],
@@ -111,37 +105,16 @@ servers = [
111
105
# Database name (e.g. "postgres")
112
106
database = " postgres"
113
107
114
- [pools .sharded .shards .1 ]
108
+ [pools .postgres .shards .1 ]
115
109
servers = [
116
110
[ " postgres" , 5432 , " primary" ],
117
111
[ " postgres" , 5432 , " replica" ],
118
112
]
119
113
database = " postgres"
120
114
121
- [pools .sharded .shards .2 ]
115
+ [pools .postgres .shards .2 ]
122
116
servers = [
123
117
[ " postgres" , 5432 , " primary" ],
124
118
[ " postgres" , 5432 , " replica" ],
125
119
]
126
120
database = " postgres"
127
-
128
-
129
- [pools .simple_db ]
130
- pool_mode = " session"
131
- default_role = " primary"
132
- query_parser_enabled = true
133
- primary_reads_enabled = true
134
- sharding_function = " pg_bigint_hash"
135
-
136
- [pools .simple_db .users .0 ]
137
- username = " postgres"
138
- password = " postgres"
139
- pool_size = 5
140
- statement_timeout = 0
141
-
142
- [pools .simple_db .shards .0 ]
143
- servers = [
144
- [ " postgres" , 5432 , " primary" ],
145
- [ " postgres" , 5432 , " replica" ]
146
- ]
147
- database = " postgres"
0 commit comments