Subchapter 63.41
references/troubleshooting.mdMarkdown7 KBView on GitHub
This file contains common additional errors encountered while working with DSQL and guidelines for how to solve them.
Before referring to any listed errors, refer to the complete DSQL troubleshooting guide
Cause: Authentication token older than 15 minutes Solutions:
Additional Recommendations:
Problem: Database connections time out after 1 hour. Solution:
Problem: Non-admin users get permission denied errors.
Solution:
GRANT statements from admin to access any schema (including public). See access-control.md for the canonical role + grant setup.users_schema) with scoped grants, separate from public. See access-control.md.ALTER DEFAULT PRIVILEGES IN SCHEMA <schema> GRANT ... TO <role> so tables created later inherit the grants automatically.AWS IAM GRANT <role> TO '<iam-role-arn>'.Problem: SSL verification fails with certificate errors.
Solution:
sslmode=verify-full and point sslrootcert at a CA bundle that includes Amazon Root CAs (sslrootcert=system works on most OSes; libpq otherwise looks at ~/.postgresql/root.crt)Problem: psql with sslmode=verify-full aborts because libpq is looking for a per-user CA bundle that doesn’t exist. Common on a fresh macOS / Linux dev box that never had a personal CA bundle provisioned.
Solution: tell libpq to use the OS trust store instead. Either pass sslrootcert=system in the connection string, or set PGSSLROOTCERT=system in the environment. The bundled scripts/psql-connect.sh does this by default; only override PGSSLROOTCERT if you have a corporate CA bundle to point at.
export PGSSLROOTCERT=system # libpq ≥16 supports `system` directly
psql "host=$ENDPOINT sslmode=verify-full sslrootcert=system" ...libpq <16: the wrapper’s PGSSLROOTCERT=system default will fail with invalid value for parameter "sslrootcert": "system". Install the Amazon Root CAs into ~/.postgresql/root.crt and override the env-var before invoking the wrapper:
PGSSLROOTCERT="$HOME/.postgresql/root.crt" ./scripts/psql-connect.sh --cluster <id> --command "..."See the accessing psql guide (opens in a new tab) for the canonical CA-bundle setup.
When migrating from PostgreSQL, remember DSQL doesn’t support:
GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY with sequences insteadDELETE FROM table insteadpostgres database per clusterCause: Attempting to create FOREIGN KEY constraint Solution:
Cause: Using TEXT[] or other array types Solution:
"tag1,tag2,tag3""["tag1","tag2","tag3"]"Cause: Creating index without ASYNC keyword Solution:
-- Wrong
CREATE INDEX idx_name ON table(column);
-- Correct
CREATE INDEX ASYNC idx_name ON table(column);Cause: Modifying too many rows in single transaction Solution:
Cause: Multiple DDL operations on same resource Solution:
Cause: Two concurrent transactions wrote to overlapping rows. DSQL uses optimistic concurrency control — the loser of the race is aborted at COMMIT time and MUST be retried.
Solution:
EXPLAIN ANALYZE (Workflow 8) and inspect node-level row counts.If the workload genuinely requires strict serial writes on the same key, accept the OCC retry cost or move that subset to a different consistency primitive — DSQL’s contract is optimistic.
Problem: Some PostgreSQL clients send unsupported protocol messages.
Solution: