1
- # PgCat Configurations
1
+ # PgCat Configurations
2
2
## ` general ` Section
3
3
4
4
### host
@@ -108,7 +108,7 @@ If we should log client disconnections
108
108
### autoreload
109
109
```
110
110
path: general.autoreload
111
- default: false
111
+ default: 15000
112
112
```
113
113
114
114
When set to true, PgCat reloads configs if it detects a change in the config file.
@@ -127,7 +127,7 @@ path: general.tcp_keepalives_idle
127
127
default: 5
128
128
```
129
129
130
- Number of seconds of connection idleness to wait before sending a keepalive packet to the server and client .
130
+ Number of seconds of connection idleness to wait before sending a keepalive packet to the server.
131
131
132
132
### tcp_keepalives_count
133
133
```
@@ -175,41 +175,11 @@ Connecting to that database allows running commands like `SHOW POOLS`, `SHOW DAT
175
175
### admin_password
176
176
```
177
177
path: general.admin_password
178
- default: <UNSET>
178
+ default: "admin_pass"
179
179
```
180
180
181
181
Password to access the virtual administrative database
182
182
183
- ### auth_query (experimental)
184
- ```
185
- path: general.auth_query
186
- default: <UNSET>
187
- ```
188
-
189
- Query to be sent to servers to obtain the hash used for md5 authentication. The connection will be
190
- established using the database configured in the pool. This parameter is inherited by every pool
191
- and can be redefined in pool configuration.
192
-
193
- ### auth_query_user (experimental)
194
- ```
195
- path: general.auth_query_user
196
- default: <UNSET>
197
- ```
198
-
199
- User to be used for connecting to servers to obtain the hash used for md5 authentication by sending the query
200
- specified in ` auth_query_user ` . The connection will be established using the database configured in the pool.
201
- This parameter is inherited by every pool and can be redefined in pool configuration.
202
-
203
- ### auth_query_password (experimental)
204
- ```
205
- path: general.auth_query_password
206
- default: <UNSET>
207
- ```
208
-
209
- Password to be used for connecting to servers to obtain the hash used for md5 authentication by sending the query
210
- specified in ` auth_query_user ` . The connection will be established using the database configured in the pool.
211
- This parameter is inherited by every pool and can be redefined in pool configuration.
212
-
213
183
## ` pools.<pool_name> ` Section
214
184
215
185
### pool_mode
@@ -243,7 +213,7 @@ If the client doesn't specify, PgCat routes traffic to this role by default.
243
213
` replica ` round-robin between replicas only without touching the primary,
244
214
` primary ` all queries go to the primary unless otherwise specified.
245
215
246
- ### query_parser_enabled (experimental)
216
+ ### query_parser_enabled
247
217
```
248
218
path: pools.<pool_name>.query_parser_enabled
249
219
default: true
@@ -264,7 +234,7 @@ If the query parser is enabled and this setting is enabled, the primary will be
264
234
load balancing of read queries. Otherwise, the primary will only be used for write
265
235
queries. The primary can always be explicitly selected with our custom protocol.
266
236
267
- ### sharding_key_regex (experimental)
237
+ ### sharding_key_regex
268
238
```
269
239
path: pools.<pool_name>.sharding_key_regex
270
240
default: <UNSET>
@@ -286,7 +256,7 @@ Current options:
286
256
` pg_bigint_hash ` : PARTITION BY HASH (Postgres hashing function)
287
257
` sha1 ` : A hashing function based on SHA1
288
258
289
- ### automatic_sharding_key (experimental)
259
+ ### automatic_sharding_key
290
260
```
291
261
path: pools.<pool_name>.automatic_sharding_key
292
262
default: <UNSET>
@@ -311,47 +281,43 @@ default: 3000
311
281
312
282
Connect timeout can be overwritten in the pool
313
283
314
- ### auth_query (experimental)
315
- ```
316
- path: general.auth_query
317
- default: <UNSET>
318
- ```
319
-
320
- Auth query can be overwritten in the pool
284
+ ## ` pools.<pool_name>.users.<user_index> ` Section
321
285
322
- ### auth_query_user (experimental)
286
+ ### username
323
287
```
324
- path: general.auth_query_user
325
- default: <UNSET>
288
+ path: pools.<pool_name>.users.<user_index>.username
289
+ default: "sharding_user"
326
290
```
327
291
328
- Auth query user can be overwritten in the pool
292
+ PostgreSQL username used to authenticate the user and connect to the server
293
+ if ` server_username ` is not set.
329
294
330
- ### auth_query_password (experimental)
295
+ ### password
331
296
```
332
- path: general.auth_query_password
333
- default: <UNSET>
297
+ path: pools.<pool_name>.users.<user_index>.password
298
+ default: "sharding_user"
334
299
```
335
300
336
- Auth query password can be overwritten in the pool
301
+ PostgreSQL password used to authenticate the user and connect to the server
302
+ if ` server_password ` is not set.
337
303
338
- ## ` pools.<pool_name>.users.<user_index> ` Section
339
-
340
- ### username
304
+ ### server_username
341
305
```
342
- path: pools.<pool_name>.users.<user_index>.username
343
- default: "sharding_user"
306
+ path: pools.<pool_name>.users.<user_index>.server_username
307
+ default: <UNSET>
308
+ example: "another_user"
344
309
```
345
310
346
- Postgresql username
311
+ PostgreSQL username used to connect to the server.
347
312
348
- ### password
313
+ ### server_password
349
314
```
350
- path: pools.<pool_name>.users.<user_index>.password
351
- default: "sharding_user"
315
+ path: pools.<pool_name>.users.<user_index>.server_password
316
+ default: <UNSET>
317
+ example: "another_password"
352
318
```
353
319
354
- Postgresql password
320
+ PostgreSQL password used to connect to the server.
355
321
356
322
### pool_size
357
323
```
@@ -382,7 +348,7 @@ default: [["127.0.0.1", 5432, "primary"], ["localhost", 5432, "replica"]]
382
348
383
349
Array of servers in the shard, each server entry is an array of ` [host, port, role] `
384
350
385
- ### mirrors (experimental)
351
+ ### mirrors
386
352
```
387
353
path: pools.<pool_name>.shards.<shard_index>.mirrors
388
354
default: <UNSET>
0 commit comments