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
{{ message }}
Repository navigation
Commit c32ef65
Browse filesBrowse the repository at this point in the historyBrowse files
[Neki] Support reading live router connections in CLI
Adds CLI support for read-only router connections for Neki. Killing
connections are not yet supported, nor are backend postgres connections.
This functionality is currently behind a feature flag and may not yet be
available on your Neki database. Example error if this is the case:
```
Error: live connections are not enabled for branch <branch> in database
<database> (organization: <org-name>)
```
Usage examples:
```
$ pscale branch connections show <database> <branch>
captured_at: 2026-10-19T19:02:05Z
*************************** 1. row ***************************
pid: 53
router: default
zone: us-east-1a
state: idle
duration: 1m22.022s
user: <redacted>
database: postgres
application: psql
client_addr: <redacted>
backend_start: 2026-10-19T18:56:33Z
shard_backends: 0
query:
<redacted>
```
If there are no queries running on a shard backend, the connections will
return `shard_backends: 0`, otherwise it will return information about
the shard backend, including the query running.
```
$ pscale branch connections show <database> <branch>
captured_at: 2026-10-19T19:07:47Z
*************************** 1. row ***************************
pid: 35
router: default
zone: us-east-1b
state: active
duration: 6.811s
user: <redacted>
database: postgres
application: psql
client_addr: <redacted>
backend_start: 2026-10-19T19:07:38Z
shard_backends: 1
shard: global
shard_uid: <redacted>
sidecar: <redacted>
backend_pid: 328942
xact_start: 2026-10-19T19:07:41Z
query_start: 2026-10-19T19:07:41Z
backend_query: <redated>
query:
<redacted>
```
0 commit comments