1- # PgCat Configurations
1+ # PgCat Configurations
22## ` general ` Section
33
44### host
@@ -108,7 +108,7 @@ If we should log client disconnections
108108### autoreload
109109```
110110path: general.autoreload
111- default: false
111+ default: 15000
112112```
113113
114114When set to true, PgCat reloads configs if it detects a change in the config file.
@@ -127,7 +127,7 @@ path: general.tcp_keepalives_idle
127127default: 5
128128```
129129
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.
131131
132132### tcp_keepalives_count
133133```
@@ -175,41 +175,11 @@ Connecting to that database allows running commands like `SHOW POOLS`, `SHOW DAT
175175### admin_password
176176```
177177path: general.admin_password
178- default: <UNSET>
178+ default: "admin_pass"
179179```
180180
181181Password to access the virtual administrative database
182182
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-
213183## ` pools.<pool_name> ` Section
214184
215185### pool_mode
@@ -243,7 +213,7 @@ If the client doesn't specify, PgCat routes traffic to this role by default.
243213` replica ` round-robin between replicas only without touching the primary,
244214` primary ` all queries go to the primary unless otherwise specified.
245215
246- ### query_parser_enabled (experimental)
216+ ### query_parser_enabled
247217```
248218path: pools.<pool_name>.query_parser_enabled
249219default: true
@@ -264,7 +234,7 @@ If the query parser is enabled and this setting is enabled, the primary will be
264234load balancing of read queries. Otherwise, the primary will only be used for write
265235queries. The primary can always be explicitly selected with our custom protocol.
266236
267- ### sharding_key_regex (experimental)
237+ ### sharding_key_regex
268238```
269239path: pools.<pool_name>.sharding_key_regex
270240default: <UNSET>
@@ -286,7 +256,7 @@ Current options:
286256` pg_bigint_hash ` : PARTITION BY HASH (Postgres hashing function)
287257` sha1 ` : A hashing function based on SHA1
288258
289- ### automatic_sharding_key (experimental)
259+ ### automatic_sharding_key
290260```
291261path: pools.<pool_name>.automatic_sharding_key
292262default: <UNSET>
@@ -311,47 +281,43 @@ default: 3000
311281
312282Connect timeout can be overwritten in the pool
313283
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
321285
322- ### auth_query_user (experimental)
286+ ### username
323287```
324- path: general.auth_query_user
325- default: <UNSET>
288+ path: pools.<pool_name>.users.<user_index>.username
289+ default: "sharding_user"
326290```
327291
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.
329294
330- ### auth_query_password (experimental)
295+ ### password
331296```
332- path: general.auth_query_password
333- default: <UNSET>
297+ path: pools.<pool_name>.users.<user_index>.password
298+ default: "sharding_user"
334299```
335300
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.
337303
338- ## ` pools.<pool_name>.users.<user_index> ` Section
339-
340- ### username
304+ ### server_username
341305```
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"
344309```
345310
346- Postgresql username
311+ PostgreSQL username used to connect to the server.
347312
348- ### password
313+ ### server_password
349314```
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"
352318```
353319
354- Postgresql password
320+ PostgreSQL password used to connect to the server.
355321
356322### pool_size
357323```
@@ -382,7 +348,7 @@ default: [["127.0.0.1", 5432, "primary"], ["localhost", 5432, "replica"]]
382348
383349Array of servers in the shard, each server entry is an array of ` [host, port, role] `
384350
385- ### mirrors (experimental)
351+ ### mirrors
386352```
387353path: pools.<pool_name>.shards.<shard_index>.mirrors
388354default: <UNSET>
0 commit comments