You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: CONFIG.md
+39
Original file line number
Diff line number
Diff line change
@@ -309,6 +309,45 @@ If the client doesn't specify, PgCat routes traffic to this role by default.
309
309
`replica` round-robin between replicas only without touching the primary,
310
310
`primary` all queries go to the primary unless otherwise specified.
311
311
312
+
### db_activity_based_routing
313
+
```
314
+
path: pools.<pool_name>.db_activity_based_routing
315
+
default: false
316
+
```
317
+
318
+
If enabled, PgCat will route queries to the primary if the queried table was recently written to.
319
+
Only relevant when `query_parser_enabled`*and*`query_parser_read_write_splitting` is enabled.
320
+
321
+
##### Considerations:
322
+
-*This feature is experimental and may not work as expected.*
323
+
- This feature only works when the same PgCat instance is used for both reads and writes to the database.
324
+
- This feature is not relevant when the primary is not part of the pool of databases used for load balancing of read queries.
325
+
- If more than one PgCat instance is used for HA purposes, this feature will not work as expected. A way to still make it work is by using sticky sessions.
0 commit comments