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: README.md
+10-6
Original file line number
Diff line number
Diff line change
@@ -18,9 +18,10 @@ PostgreSQL pooler (like PgBouncer) with sharding, load balancing and failover su
18
18
| Load balancing of read queries |:white_check_mark:| Using round-robin between replicas. Primary is included when `primary_reads_enabled` is enabled (default). |
19
19
| Sharding |:white_check_mark:| Transactions are sharded using `SET SHARD TO` and `SET SHARDING KEY TO` syntax extensions; see examples below. |
20
20
| Failover |:white_check_mark:| Replicas are tested with a health check. If a health check fails, remaining replicas are attempted; see below for algorithm description and examples. |
21
-
| Statistics reporting|:white_check_mark:| Statistics available in the admin database (`pgcat` and `pgbouncer`) with `SHOW STATS`, `SHOW POOLS` and others. |
22
-
| Live configuration reloading |:white_check_mark:| Reload supported settings with a `SIGHUP` to the process, e.g. `kill -s SIGHUP $(pgrep pgcat)` or `RELOAD` query issued to the admin database.|
21
+
| Statistics |:white_check_mark:| Statistics available in the admin database (`pgcat` and `pgbouncer`) with `SHOW STATS`, `SHOW POOLS` and others.|
22
+
| Live configuration reloading |:white_check_mark:| Reload supported settings with a `SIGHUP` to the process, e.g. `kill -s SIGHUP $(pgrep pgcat)` or `RELOAD` query issued to the admin database. |
23
23
| Client authentication |:x::wrench:| On the roadmap; currently all clients are allowed to connect and one user is used to connect to Postgres. |
24
+
| Admin database |:white_check_mark:| The admin database, similar to PgBouncer's, allows to query for statistics and reload the configuration. |
24
25
25
26
## Deployment
26
27
@@ -89,7 +90,7 @@ See [sharding README](./tests/sharding/README.md) for sharding logic testing.
89
90
| Load balancing |:white_check_mark:|:white_check_mark:| We could test this by emitting statistics for each replica and compare them. |
90
91
| Failover |:white_check_mark:|:white_check_mark:| Misconfigure a replica in `pgcat.toml` and watch it forward queries to spares. CI testing is using Toxiproxy. |
91
92
| Sharding |:white_check_mark:|:white_check_mark:| See `tests/sharding` and `tests/ruby` for an Rails/ActiveRecord example. |
92
-
| Statistics reporting |:x:|:white_check_mark:|Run `nc -l -u 8125` and watch the stats come in every 15 seconds. |
93
+
| Statistics |:white_check_mark:|:white_check_mark:|Query the admin database with `psql -h 127.0.0.1 -p 6432 -d pgbouncer -c 'SHOW STATS'`.|
93
94
| Live config reloading |:white_check_mark:|:white_check_mark:| Run `kill -s SIGHUP $(pgrep pgcat)` and watch the config reload. |
94
95
95
96
## Usage
@@ -232,11 +233,15 @@ SELECT * FROM users WHERE email = '[email protected]'; -- shard setting lasts unt
232
233
233
234
### Statistics reporting
234
235
235
-
Stats are reported using StatsD every 15 seconds. The address is configurable with `statsd_address`, the default is `127.0.0.1:8125`. The stats are very similar to what Pgbouncer reports and the names are kept to be comparable.
236
+
The stats are very similar to what Pgbouncer reports and the names are kept to be comparable. They are accessible by querying the admin database `pgcat`, and `pgbouncer` for compatibility.
The config can be reloaded by sending a `kill -s SIGHUP` to the process. Not all settings are currently supported by live reload:
244
+
The config can be reloaded by sending a `kill -s SIGHUP` to the process or by querying `RELOAD` to the admin database. Not all settings are currently supported by live reload:
0 commit comments