Repository navigation
[Neki] Support reading live router connections in CLI - #1473
Merged
Merged
Conversation
nholden
approved these changes
Oct 19, 2026
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 81fa62b. Configure here.
eileencodes
force-pushed
the
neki-live-connections
branch
from
October 19, 2026 20:08
81fa62b to
2654e8f
Compare
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> ```
eileencodes
force-pushed
the
neki-live-connections
branch
from
October 19, 2026 20:11
2654e8f to
c32ef65
Compare
dgraham
approved these changes
Oct 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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:
Usage examples:
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.