Connect PostgreSQL for read-only querying during investigations.Your agent can inspect the current setup, prepare the connection and test access. You choose the account and resource scope, approve provider consent when needed, and authorize any required grants.
Connect PostgreSQL so Struct Agent can query application data during investigations. Use the documented read-only role and verify the intended database.Use the catalog’s current fields, choices and permission requirements. Reuse an existing healthy connection instead of creating a duplicate.Use Inspect
Replace the values in angle brackets.Permission catalog version
Inspect access and existing connections
Use a claimed workspace with permission to configure connections.Connect with the CLI
Supply credentials from approved secret storage throughPGPASSWORD, POSTGRES_CONNECTION_STRING. The catalog describes which are needed for the selected authentication method. Do not put literal secrets in shell arguments or chat.Replace example values with the intended resource:PGPASSWORD from a secret manager. The default port is 5432 and SSL mode is require; choose verify-full when the certificate chain is supported. Private CA files are not supported. For a connection string, use --connection-string-env PG_URL. Add --test-only to check without saving, and inspect ok even when the exit code is zero. See SSH tunnels for private networks.Verify and recover
Use the returned connection ID:ok, health and missing permissions, not only the exit code. struct connections grant-command CONNECTION_ID prints repair instructions where supported; have an authorized operator apply them. For expired OAuth links, start the connection command again and use the new link. Do not reconnect to a different account silently.Verify a bounded operation for the requested job. Connection health proves checked access; it does not prove telemetry arrival, an investigation or alert delivery.What Struct does with it
Answers data questions during investigations, such as how many orders failed in a window, and measures the impact of Issues with live queries you can inspect.Permissions
Use a dedicated read-only role with USAGE and SELECT on the schemas Struct should query. Struct runs every query in a read-only transaction and never writes to your database.Read-only queries
Answer data questions during investigations and measure the impact of open issues.- Grant schemas one by one rather than
pg_read_all_data: that role reads every table in every database on the server, and limitingCONNECTdoes not narrow it.
How to grant
Create a read-only role
Create a read-only role
2026-11-04.1. See permission changes.