Skip to content

Commit 57e8469

Browse files
aprimakinaclaude
andcommitted
docs(db): tighten read replica help text
Drop the redundant "in place of the service ID" and doubled "read replica" wording from the db connection commands' help and the README, and remove the read-only/lag aside from `db connect` help (kept in the MCP tool description). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 9053d55 commit 57e8469

3 files changed

Lines changed: 9 additions & 15 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Tiger CLI provides the following commands:
110110
- `delete` - Delete a service
111111
- `update-password` - Update service master password
112112
- `logs` - View service logs
113-
- `tiger db` - Database operations (each command below also accepts a read replica set ID in place of the service ID)
113+
- `tiger db` - Database operations (each command below also accepts a read replica set ID)
114114
- `connect` - Connect to a database with psql (in an interactive terminal, if the service has read replicas, offers to connect to one of them; use `--no-replica-prompt` to skip)
115115
- `connection-string` - Get connection string for a service
116116
- `test-connection` - Test database connectivity

internal/tiger/cmd/db.go

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ The service ID can be provided as an argument or will use the default service
5555
from your configuration. The connection string includes all necessary parameters
5656
for establishing a database connection to the TimescaleDB/PostgreSQL service.
5757
58-
You can also pass a read replica set ID in place of the service ID to get a
59-
connection string for that read replica.
58+
You can also pass a read replica set ID to get a connection string for that replica.
6059
6160
By default, passwords are excluded from the connection string for security.
6261
Use --with-password to include the password directly in the connection string.
@@ -161,10 +160,8 @@ primary. Use --no-replica-prompt to skip this prompt and always connect to the
161160
requested service. The prompt is automatically skipped when stdin is not a
162161
terminal (e.g. in scripts) or when the service has no read replicas.
163162
164-
You can also pass a read replica set ID directly in place of the service ID to
165-
connect straight to that read replica without the prompt.
166-
Read replicas are read-only, may lag the primary, and share the primary
167-
service's credentials.
163+
You can also pass a read replica set ID to connect straight to that replica,
164+
skipping the prompt. Read replicas share the primary's credentials.
168165
169166
Examples:
170167
# Connect to default service
@@ -264,8 +261,7 @@ The service ID can be provided as an argument or will use the default service
264261
from your configuration. This command tests if the database is accepting
265262
connections and returns appropriate exit codes following pg_isready conventions.
266263
267-
You can also pass a read replica set ID in place of the service ID to test
268-
connectivity to that read replica.
264+
You can also pass a read replica set ID to test connectivity to that replica.
269265
270266
Return Codes:
271267
0: Server is accepting connections normally
@@ -814,10 +810,9 @@ indexes, triggers, and TimescaleDB hypertable and continuous aggregate
814810
metadata.
815811
816812
The service ID can be provided as an argument or will use the default service
817-
from your configuration. You can also pass a read replica set ID in place of the
818-
service ID to introspect that read replica. Only objects the connecting role can
819-
access are returned. The connection is opened in Tiger Cloud's immutable
820-
read-only mode.
813+
from your configuration. You can also pass a read replica set ID to introspect
814+
that replica. Only objects the connecting role can access are returned. The
815+
connection is opened in Tiger Cloud's immutable read-only mode.
821816
822817
By default only user-facing schemas and objects are shown. View and routine
823818
definitions and object comments are omitted unless requested, since they can be

internal/tiger/common/replica.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ func GetService(ctx context.Context, client api.ClientWithResponsesInterface, pr
5656
// ResolveConnectionTarget turns a fetched service into a ConnectionTarget. When
5757
// the service is a standby read replica (ForkedFrom.IsStandby), it connects to
5858
// the replica but resolves credentials against the parent primary, which is
59-
// fetched here. Everything else (primary, or an independent fork with its own
60-
// credentials) connects with its own credentials.
59+
// fetched here.
6160
func ResolveConnectionTarget(ctx context.Context, client api.ClientWithResponsesInterface, projectID string, service api.Service) (*ConnectionTarget, error) {
6261
fork := service.ForkedFrom
6362
if fork == nil || !util.Deref(fork.IsStandby) {

0 commit comments

Comments
 (0)