Skip to content

Commit a2ea674

Browse files
committed
sv_idle_xact, sharding support for prepare/execute
1 parent 59c196d commit a2ea674

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

docs/administration/pools.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ The following information is returned for each connection pool (user/database pa
2020
| `cl_waiting` | Number of clients waiting for a connection from this pool. | `3` |
2121
| `sv_idle` | Number of idle server connections in the pool. | `8` |
2222
| `sv_active` | Number of checked out (used) server connections in the pool. | `12` |
23+
| `sv_idle_xact` | Number of idle-in-transaction server connections in the pool. | `0` |
2324
| `sv_total` | Total number of server connections in the pool. | `20` |
2425
| `maxwait` | Maximum wait time for connections. | `30` |
2526
| `maxwait_us` | Maximum wait time for connections in microseconds. | `30000000` |

docs/features/metrics.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ The following metrics are exported via the OpenMetrics endpoint:
7474
| `cl_waiting` | Clients waiting for a connection from a pool. | `gauge` |
7575
| `sv_active` | Servers currently serving client requests. | `gauge` |
7676
| `sv_idle` | Servers available for clients to use. | `gauge` |
77+
| `sv_idle_xact` | Servers currently idle in transaction. | `gauge` |
7778
| `maxwait` | How long clients have been waiting for a connection (in seconds). | `gauge` |
7879
| `errors` | Errors that connections in the pool have experienced. | `counter` |
7980
| `out_of_sync` | Connections that have been returned to the pool in a broken state. | `counter` |

docs/features/prepared-statements.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ prepared_statements = "full"
8282
Statements prepared using this method can be executed normally with `Bind` and `Execute` messages. Result data types can be inspected with `Describe`, just
8383
like a regular prepared statement.
8484

85+
!!! note "Sharding support"
86+
Currently, `EXECUTE` of prepared statements requiring [sharding](sharding/index.md) isn't supported. By default, the statement
87+
will be sent to all shards.
88+
8589
## Unnamed statements
8690

8791
By default, unnamed (or anonymous) prepared statements are not cached and are sent to Postgres as-is. This works fine for most client drivers because they send the entire query in a single request. However, some drivers, like `go/pq` do not.

0 commit comments

Comments
 (0)