[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-aws-labs-distributed-postgres":3,"mdc--2gannh-key":49,"related-repo-aws-labs-distributed-postgres":2854,"related-org-aws-labs-distributed-postgres":2937},{"slug":4,"name":5,"fn":6,"description":7,"org":8,"tags":13,"stars":30,"repoUrl":31,"updatedAt":32,"license":33,"forks":34,"topics":35,"repo":44,"sourceUrl":47,"mdContent":48},"distributed-postgres","distributed postgres","build applications with Aurora DSQL","Build with Aurora DSQL — manage schemas, execute queries, handle migrations, diagnose query plans, load data, and develop applications with a serverless, distributed SQL database. Covers IAM auth, multi-tenant patterns, MySQL-to-DSQL and PostgreSQL-to-DSQL schema conversion, FK replacement code generation, OCC retry patterns, ORM migration (Django\u002FHibernate\u002FRails), DDL operations, query plan explainability, SQL compatibility validation, and bulk data loading. Triggers on phrases like: DSQL, Aurora DSQL, create DSQL table, DSQL schema, migrate to DSQL, distributed SQL database, serverless PostgreSQL-compatible database, DSQL query plan, DSQL EXPLAIN ANALYZE, why is my DSQL query slow, DSQL foreign key, DSQL OCC retry, DSQL multi-region, load into DSQL, load CSV into DSQL, bulk load DSQL, aurora-dsql-loader.",{"slug":9,"name":10,"logoUrl":11,"githubOrg":12},"aws-labs","AWS Labs","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Faws-labs.png","awslabs",[14,18,21,24,27],{"name":15,"slug":16,"type":17},"Database","database","tag",{"name":19,"slug":20,"type":17},"PostgreSQL","postgresql",{"name":22,"slug":23,"type":17},"SQL","sql",{"name":25,"slug":26,"type":17},"Serverless","serverless",{"name":28,"slug":29,"type":17},"AWS","aws",9427,"https:\u002F\u002Fgithub.com\u002Fawslabs\u002Fmcp","2026-07-12T08:36:46.530743",null,1634,[29,36,37,38,39,40,41,42,43],"mcp","mcp-client","mcp-clients","mcp-host","mcp-server","mcp-servers","mcp-tools","modelcontextprotocol",{"repoUrl":31,"stars":30,"forks":34,"topics":45,"description":46},[29,36,37,38,39,40,41,42,43],"Open source MCP Servers for AWS","https:\u002F\u002Fgithub.com\u002Fawslabs\u002Fmcp\u002Ftree\u002FHEAD\u002Fsrc\u002Faurora-dsql-mcp-server\u002Fskills\u002Fdistributed-postgres-skill","---\nname: distributed postgres\ndescription: \"Build with Aurora DSQL — manage schemas, execute queries, handle migrations, diagnose query plans, load data, and develop applications with a serverless, distributed SQL database. Covers IAM auth, multi-tenant patterns, MySQL-to-DSQL and PostgreSQL-to-DSQL schema conversion, FK replacement code generation, OCC retry patterns, ORM migration (Django\u002FHibernate\u002FRails), DDL operations, query plan explainability, SQL compatibility validation, and bulk data loading. Triggers on phrases like: DSQL, Aurora DSQL, create DSQL table, DSQL schema, migrate to DSQL, distributed SQL database, serverless PostgreSQL-compatible database, DSQL query plan, DSQL EXPLAIN ANALYZE, why is my DSQL query slow, DSQL foreign key, DSQL OCC retry, DSQL multi-region, load into DSQL, load CSV into DSQL, bulk load DSQL, aurora-dsql-loader.\"\n---\n\n# Amazon Aurora DSQL Skill\n\nAurora DSQL is a serverless, PostgreSQL-compatible distributed SQL database. This skill provides direct database interaction via MCP tools, schema management, migration support, and multi-tenant patterns.\n\n**Key capabilities:**\n\n- Direct query execution via MCP tools\n- Schema management with DSQL constraints\n- Migration support and safe schema evolution\n- Multi-tenant isolation patterns\n- IAM-based authentication\n\n---\n\n## Reference Files\n\nLoad these files as needed for detailed guidance:\n\n### [development-guide.md](references\u002Fdevelopment-guide.md)\n\n**When:** ALWAYS load before implementing schema changes or database operations\n**Contains:** [Best Practices](references\u002Fdevelopment-guide.md#best-practices), DDL rules, connection patterns, transaction limits, data type serialization patterns, application-layer referential integrity instructions, security best practices\n\n### MCP:\n\n#### [mcp-setup.md](mcp\u002Fmcp-setup.md)\n\n**When:** Always load for guidance using or updating the DSQL MCP server\n**Contains:** Instructions for setting up the DSQL MCP server with 2 configuration options as\nsampled in [mcp\u002F.mcp.json](mcp\u002F.mcp.json)\n\n1. Documentation-Tools Only\n2. Database Operations (requires a cluster endpoint)\n\n#### [mcp-tools.md](mcp\u002Fmcp-tools.md)\n\n**When:** Load when you need detailed MCP tool syntax and examples. PREFER MCP tools for ad-hoc queries — execute directly rather than writing scripts.\n**Contains:** Tool parameters, detailed examples, usage patterns, [input validation](mcp\u002Ftools\u002Finput-validation.md)\n\n### [language.md](references\u002Flanguage.md)\n\n**When:** MUST load when making language-specific implementation choices. ALWAYS prefer DSQL Connector when available.\n**Contains:** Driver selection, framework patterns, connection code for Python\u002FJS\u002FGo\u002FJava\u002FRust\n\n### [dsql-examples.md](references\u002Fdsql-examples.md)\n\n**When:** Load when looking for specific implementation examples\n**Contains:** Code examples, repository patterns, multi-tenant implementations\n\n### [troubleshooting.md](references\u002Ftroubleshooting.md)\n\n**When:** Load when debugging errors or unexpected behavior. SHOULD always consult for OCC errors, connection failures, or unexpected query results.\n**Contains:** Common pitfalls, error messages, solutions\n\n### [onboarding.md](references\u002Fonboarding.md)\n\n**When:** User explicitly requests to \"Get started with DSQL\" or similar phrase\n**Contains:** Interactive step-by-step guide for new users\n\n### [access-control.md](references\u002Faccess-control.md)\n\n**When:** MUST load when creating database roles, granting permissions, setting up schemas for applications, or handling sensitive data. ALWAYS use scoped roles for applications — create database roles with `dsql:DbConnect`.\n**Contains:** Scoped role setup, IAM-to-database role mapping, schema separation for sensitive data, role design patterns\n\n### [occ-retry-patterns.md](references\u002Focc-retry-patterns.md)\n\n**When:** MUST load when writing OCC retry code or mitigating commit-time conflicts\n**Contains:** DSQL Connectors, manual retry pattern, conflict mitigation, idempotent transaction design\n\n### DDL Migrations (modular):\n\n#### [ddl-migrations\u002Foverview.md](references\u002Fddl-migrations\u002Foverview.md)\n\n**When:** MUST load when performing DROP COLUMN, RENAME COLUMN, ALTER COLUMN TYPE, or DROP CONSTRAINT\n**Contains:** Table recreation pattern overview, transaction rules, common verify & swap pattern\n\n#### [ddl-migrations\u002Fcolumn-operations.md](references\u002Fddl-migrations\u002Fcolumn-operations.md)\n\n**When:** Load for DROP COLUMN, ALTER COLUMN TYPE, SET\u002FDROP NOT NULL, SET\u002FDROP DEFAULT migrations\n**Contains:** Step-by-step migration patterns for column-level changes\n\n#### [ddl-migrations\u002Fconstraint-operations.md](references\u002Fddl-migrations\u002Fconstraint-operations.md)\n\n**When:** Load for ADD\u002FDROP CONSTRAINT, MODIFY PRIMARY KEY, column split\u002Fmerge migrations\n**Contains:** Step-by-step migration patterns for constraint and structural changes\n\n#### [ddl-migrations\u002Fbatched-migration.md](references\u002Fddl-migrations\u002Fbatched-migration.md)\n\n**When:** Load when migrating tables exceeding 3,000 rows\n**Contains:** OFFSET-based and cursor-based batching patterns, progress tracking, error handling\n\n### MySQL Migrations (modular):\n\n#### [mysql-migrations\u002Ftype-mapping.md](references\u002Fmysql-migrations\u002Ftype-mapping.md)\n\n**When:** MUST load when migrating MySQL schemas to DSQL\n**Contains:** MySQL data type mappings, feature alternatives, DDL operation mapping\n\n#### [mysql-migrations\u002Fddl-operations.md](references\u002Fmysql-migrations\u002Fddl-operations.md)\n\n**When:** Load when translating MySQL DDL operations to DSQL equivalents\n**Contains:** ALTER COLUMN, DROP COLUMN, AUTO_INCREMENT, ENUM, SET, FOREIGN KEY migration patterns\n\n#### [mysql-migrations\u002Ffull-example.md](references\u002Fmysql-migrations\u002Ffull-example.md)\n\n**When:** Load when migrating a complete MySQL table to DSQL\n**Contains:** End-to-end MySQL CREATE TABLE migration example with decision summary\n\n### PostgreSQL Migrations (modular):\n\n#### [pg-migrations\u002Ftype-mapping.md](references\u002Fpg-migrations\u002Ftype-mapping.md)\n\n**When:** MUST load for PostgreSQL → DSQL type questions\n**Contains:** C collation rules, NUMERIC precision, JSON\u002FJSONB, types mapped to TEXT by `dsql_lint`\n\n#### [pg-migrations\u002Ffk-replacement.md](references\u002Fpg-migrations\u002Ffk-replacement.md)\n\n**When:** MUST load for foreign-key validation code generation\n**Contains:** Tenant-scoped `validate_fk_*()` template, cascade handling\n\n#### [pg-migrations\u002Findex-conversion.md](references\u002Fpg-migrations\u002Findex-conversion.md)\n\n**When:** MUST load for unfixable index diagnostics\n**Contains:** GIN\u002FGiST\u002FBRIN → btree, partial and expression index conversion, async index status\n\n#### [pg-migrations\u002Fschema-objects.md](references\u002Fpg-migrations\u002Fschema-objects.md)\n\n**When:** MUST load for ENUM, materialized views, extensions, or multi-schema handling\n**Contains:** ENUM → CHECK, views, temp\u002Fpartitioned\u002Finherited tables, role\u002FIAM mapping\n\n#### [pg-migrations\u002Fmulti-region.md](references\u002Fpg-migrations\u002Fmulti-region.md)\n\n**When:** Load for multi-region, active-active, or HA questions\n**Contains:** Architecture patterns, geographic partitioning\n\n### ORM Guides:\n\n#### [orm-guides\u002Foverview.md](references\u002Form-guides\u002Foverview.md)\n\n**When:** Load when migrating any ORM to DSQL\n**Contains:** Adapter names and key gotchas for Django, Hibernate, Rails, SQLAlchemy\n\n### Data Loading:\n\n#### [data-loading.md](references\u002Fdata-loading.md)\n\n**When:** Load when planning or running bulk loads with `aurora-dsql-loader`\n**Contains:** Fresh-vs-warm partitions, resume\u002Fretry, `--on-conflict` semantics, throughput diagnostics\n\n### Query Plan Explainability (modular):\n\n**When:** MUST load all four at Workflow 8 Phase 0 — [query-plan\u002Fplan-interpretation.md](references\u002Fquery-plan\u002Fplan-interpretation.md), [query-plan\u002Fcatalog-queries.md](references\u002Fquery-plan\u002Fcatalog-queries.md), [query-plan\u002Fguc-experiments.md](references\u002Fquery-plan\u002Fguc-experiments.md), [query-plan\u002Freport-format.md](references\u002Fquery-plan\u002Freport-format.md)\n**Contains:** DSQL node types + Node Duration math + estimation-error bands, pg_class\u002Fpg_stats\u002Fpg_indexes SQL + correlated-predicate verification, GUC experiment procedures + 30-second skip protocol, required report structure + element checklist + support request template\n\n### SQL Compatibility Validation:\n\n#### [dsql-lint.md](references\u002Fdsql-lint.md)\n\n**When:** MUST load before running `dsql_lint`, processing externally-sourced SQL (pg_dump, ORM migrations, user-pasted DDL), or resolving `fixed_with_warning` \u002F unfixable diagnostics\n**Contains:** `dsql_lint` MCP tool reference, fix statuses, ORM integration, unfixable error resolution\n\n---\n\n## MCP Tools Available\n\nThe `aurora-dsql` MCP server provides these tools:\n\n**Database Operations:**\n\n1. **readonly_query** - Execute SELECT queries (returns list of dicts)\n2. **transact** - Execute DDL\u002FDML statements in transaction (takes list of SQL statements)\n3. **get_schema** - Get table structure for a specific table\n\n**SQL Validation:**\n\n1. **dsql_lint** - Validate SQL for DSQL compatibility and optionally auto-fix issues. Use before executing externally-sourced SQL.\n\n**Documentation & Knowledge:**\n\n1. **dsql_search_documentation** - Search Aurora DSQL documentation\n2. **dsql_read_documentation** - Read specific documentation pages\n3. **dsql_recommend** - Get DSQL best practice recommendations\n\n**Note:** There is no `list_tables` tool. Use `readonly_query` with information_schema.\n\nSee [mcp-setup.md](mcp\u002Fmcp-setup.md) for detailed setup instructions.\nSee [mcp-tools.md](mcp\u002Fmcp-tools.md) for detailed usage and examples.\n\n### AWS Knowledge MCP (`awsknowledge`)\n\nConsult for verifying DSQL service limits before advising users. The numeric limits below are\ndefaults that may change — when a user's decision depends on an exact limit, verify it first:\n\n| Limit                          | Default       | Verify query                       |\n| ------------------------------ | ------------- | ---------------------------------- |\n| Max rows per transaction       | 3,000         | `aurora dsql transaction limits`   |\n| Max data size per transaction  | 10 MiB        | `aurora dsql transaction limits`   |\n| Max transaction duration       | 5 minutes     | `aurora dsql transaction limits`   |\n| Max connections per cluster    | 10,000        | `aurora dsql connection limits`    |\n| Auth token expiry              | 15 minutes    | `aurora dsql authentication token` |\n| Max connection duration        | 60 minutes    | `aurora dsql connection limits`    |\n| Max indexes per table          | 24            | `aurora dsql index limits`         |\n| Max columns per index          | 8             | `aurora dsql index limits`         |\n| IDENTITY\u002FSEQUENCE CACHE values | 1 or >= 65536 | `aurora dsql sequence cache`       |\n| Supported column data types    | See docs      | `aurora dsql supported data types` |\n\n**When to verify:** Before recommending batch sizes, connection pool settings, or schema designs where hitting a limit would cause failures; any time the exact number can affect user decision.\n\n**Fallback:** If `awsknowledge` is unavailable, use the defaults above and flag that limits should be verified against [DSQL documentation](https:\u002F\u002Fdocs.aws.amazon.com\u002Faurora-dsql\u002Flatest\u002Fuserguide\u002F).\n\n## CLI Scripts Available\n\nBash scripts in [scripts\u002F](scripts\u002F) for cluster management (create, delete, list, cluster info), psql connection, and bulk data loading from local\u002Fs3 csv\u002Ftsv\u002Fparquet files.\nSee [scripts\u002FREADME.md](scripts\u002FREADME.md) for usage and hook configuration.\n\n---\n\n## Quick Start\n\n1. **Explore:** Use `readonly_query` with `information_schema` to list tables. Use `get_schema` for table structure.\n2. **Query:** Use `readonly_query` for SELECT queries. **MUST** include `tenant_id` in WHERE for multi-tenant apps. **MUST** build SQL with `safe_query.build()`.\n3. **Schema changes:** Use `transact` with one DDL per transaction. **MUST** batch DML under 3,000 rows. **MUST** use `CREATE INDEX ASYNC` in a separate call. Use `dsql_lint` to validate first.\n\n---\n\n## Common Workflows\n\n### Workflow 1: Create Multi-Tenant Schema\n\n1. Create main table with tenant_id column using transact\n2. Create async index on tenant_id in separate transact call\n3. Create composite indexes for common query patterns (separate transact calls)\n4. Verify schema with get_schema\n\n- MUST include tenant_id in all tables\n- MUST use `CREATE INDEX ASYNC` exclusively\n- MUST issue each DDL in its own transact call: `transact([\"CREATE TABLE ...\"])`\n- MUST serialize arrays into a single-column representation; PREFER `JSONB` (operators work directly); MAY use `TEXT` when the column is opaque to the database; ASK the user. For `JSONB` arrays, expand at query time with `jsonb_array_elements_text(data)`\n\n### Workflow 2: Safe Data Migration\n\nEvery DDL statement generated in this workflow MUST be validated with `dsql_lint(fix=true)` before its `transact` call — applies to step 2 (ADD COLUMN) and step 5 (async index). DML (`UPDATE` in step 3) does not require linting.\n\n1. Validate ALTER TABLE DDL with `dsql_lint(sql=..., fix=true)` — handle diagnostics per [dsql-lint.md](references\u002Fdsql-lint.md)\n2. Add column using transact: `transact([\"ALTER TABLE ... ADD COLUMN ...\"])`\n3. Populate existing rows with UPDATE in separate transact calls (batched under 3,000 rows)\n4. Verify migration with readonly_query using COUNT\n5. If an index is needed: validate CREATE INDEX ASYNC DDL with `dsql_lint(sql=..., fix=true)`, then create via transact\n\n- MUST validate every externally-sourced or generated DDL statement with `dsql_lint` before executing\n- MUST add column first, populate later\n- MUST issue ADD COLUMN with only name and type; apply DEFAULT via separate UPDATE\n- MUST batch updates under 3,000 rows in separate transact calls\n- MUST issue each ALTER TABLE in its own transaction\n\n**Recovery — batch fails midway:** Rows already updated keep their new value (each batch committed independently). Resume by filtering on the unset state (`WHERE new_column IS NULL`) and continue. Re-running is safe because the filter naturally excludes completed rows.\n\n### Workflow 3: Application-Layer Referential Integrity\n\n**INSERT:** MUST validate parent exists with readonly_query → throw error if not found → insert child with transact.\n\n**DELETE:** MUST check dependents with readonly_query COUNT → return error if dependents exist → delete with transact if safe.\n\n### Workflow 4: Query with Tenant Isolation\n\n1. **MUST** authorize the caller against the tenant — format validation does not establish authorization\n2. **MUST** build SQL with [`safe_query.build()`](mcp\u002Ftools\u002Fsafe_query.py) — use `allow()`\u002F`regex()` for\n   values (emits `'v'`), `ident()` for table\u002Fcolumn names (emits `\"v\"`).\n   See [input-validation.md](mcp\u002Ftools\u002Finput-validation.md)\n3. **MUST** include `tenant_id` in the WHERE clause; reject cross-tenant access at the application layer\n\n### Workflow 5: Set Up Scoped Database Roles\n\nMUST load [access-control.md](references\u002Faccess-control.md) for role setup, IAM mapping, and schema permissions.\n\n### Workflow 6: Table Recreation DDL Migration\n\nDSQL does NOT support direct `ALTER COLUMN TYPE`, `DROP COLUMN`, `DROP CONSTRAINT`, or `MODIFY PRIMARY KEY`. These require the **Table Recreation Pattern**. This is a destructive workflow that requires user confirmation at each step. Every generated DDL in the pattern (CREATE new, INSERT ... SELECT, DROP old, RENAME) MUST be validated with `dsql_lint(sql=..., fix=true)` before execution.\n\nMUST load [ddl-migrations\u002Foverview.md](references\u002Fddl-migrations\u002Foverview.md) before attempting any of these operations.\n\n### Workflow 7: Validate and Migrate to DSQL\n\nMUST load [dsql-lint.md](references\u002Fdsql-lint.md) before running `dsql_lint` — it defines diagnostic handling, the three `fix_result.status` values (`fixed`, `fixed_with_warning`, `unfixable`), and user-confirmation gates.\n\nRun `dsql_lint(sql=source_sql, fix=true)` to validate and auto-convert PostgreSQL-compatible SQL. `dsql_lint` uses a PostgreSQL parser, so MySQL dialect syntax that PostgreSQL cannot parse (e.g., `PARTITION BY HASH`, `AUTO_INCREMENT` in some positions) surfaces as a `parse_error` rule rather than individual diagnostics.\n\n- For MySQL-origin SQL, MUST cross-check the source against [mysql-migrations\u002Ftype-mapping.md](references\u002Fmysql-migrations\u002Ftype-mapping.md) even when lint returns clean — `ENGINE=` clauses and `SET(...)` column types can pass silently through the PostgreSQL parser.\n- On `parse_error`, fall back to [mysql-migrations\u002Ftype-mapping.md](references\u002Fmysql-migrations\u002Ftype-mapping.md) for manual conversion, then re-run `dsql_lint` on the converted output before executing.\n\n### Workflow 8: Query Plan Explainability\n\nExplains why the DSQL optimizer chose a particular plan. Triggered by slow queries, high DPU, unexpected Full Scans, or plans the user doesn't understand. **REQUIRES a structured Markdown diagnostic report is the deliverable** beyond conversation — run the workflow end-to-end before answering. Use the `aurora-dsql` MCP when connected; fall back to raw `psql` with a generated IAM token (see the fallback block below) otherwise.\n\n**Phase 0 — Load reference material.** Read all four before starting — each has content later phases need verbatim (node-type math, exact catalog SQL, the `>30s` skip protocol, required report elements):\n\n1. [query-plan\u002Fplan-interpretation.md](references\u002Fquery-plan\u002Fplan-interpretation.md) — node types, duration math, anomalous values\n2. [query-plan\u002Fcatalog-queries.md](references\u002Fquery-plan\u002Fcatalog-queries.md) — pg_class \u002F pg_stats \u002F pg_indexes SQL\n3. [query-plan\u002Fguc-experiments.md](references\u002Fquery-plan\u002Fguc-experiments.md) — GUC procedures and `>30s` skip protocol\n4. [query-plan\u002Freport-format.md](references\u002Fquery-plan\u002Freport-format.md) — required report structure\n\n**Phase 1 — Capture the plan.** **ALWAYS** run `readonly_query(\"EXPLAIN ANALYZE VERBOSE …\")` on the user's query verbatim (SELECT form) — **ALWAYS** capture a fresh plan from the cluster, even when the user describes the plan or reports an anomaly. **MAY** leverage `get_schema` or `information_schema` for schema sanity checks. When EXPLAIN errors (`relation does not exist`, `column does not exist`), **MUST** report the error verbatim — **MUST NOT** invent DSQL-specific semantics (e.g., case sensitivity, identifier quoting) as the root cause. Extract Query ID, Planning Time, Execution Time, DPU Estimate. **SELECT** runs as-is. **UPDATE\u002FDELETE** rewrite to the equivalent SELECT (same join chain + WHERE) — the optimizer picks the same plan shape. **INSERT**, pl\u002Fpgsql, DO blocks, and functions **MUST** be rejected. **MUST NOT** use `transact --allow-writes` for plan capture; it bypasses MCP safety.\n\n**Phase 2 — Gather evidence.** Using SQL from `catalog-queries.md`, query `pg_class`, `pg_stats`, `pg_indexes`, `COUNT(*)`, `COUNT(DISTINCT)`. Classify estimation errors per `plan-interpretation.md` (2x–5x minor, 5x–50x significant, 50x+ severe). Detect correlated predicates and data skew.\n\n**Phase 3 — Experiment (conditional).** ≤30s: run GUC experiments per `guc-experiments.md` (default + merge-join-only) plus optional redundant-predicate test. >30s: skip experiments, include the manual GUC testing SQL verbatim in the report, and do not re-run for redundant-predicate testing. Anomalous values (impossible row counts): confirm query results are correct despite the anomalous EXPLAIN, flag as a potential DSQL bug, and produce the Support Request Template from `report-format.md`.\n\n**Phase 4 — Produce the report, invite reassessment.** Produce the full diagnostic report per the \"Required Elements Checklist\" in [query-plan\u002Freport-format.md](references\u002Fquery-plan\u002Freport-format.md) — structure is non-negotiable. End with the \"Next Steps\" block from that reference so the user can ask for a reassessment after applying a recommendation. When the user says \"reassess\" (or equivalent), re-run Phase 1–2 and **append an \"Addendum: After-Change Performance\"** to the original report (before\u002Fafter table, match against expected impact) rather than producing a new report.\n\n**psql fallback (MCP unavailable).** Pipe statements into `psql` via heredoc and check `$?`; report failures without proceeding on partial evidence:\n\n```bash\nTOKEN=$(aws dsql generate-db-connect-admin-auth-token --hostname \"$HOST\" --region \"$REGION\")\nPGPASSWORD=\"$TOKEN\" psql \"host=$HOST port=5432 user=admin dbname=postgres sslmode=require\" \u003C\u003C\u003C\"EXPLAIN ANALYZE VERBOSE \u003Csql>;\"\n```\n\n**Safety.** Plan capture uses `readonly_query` exclusively — it rejects INSERT\u002FUPDATE\u002FDELETE\u002FDDL at the MCP layer. Rewrite DML to SELECT (Phase 1) rather than asking `transact --allow-writes` to run it; write-mode `transact` bypasses all MCP safety checks. **MUST NOT** run arbitrary DDL\u002FDML or pl\u002Fpgsql.\n\n---\n\n## Error Scenarios\n\n- **`awsknowledge` returns no results:** Use the default limits in the table above and note that limits should be verified against [DSQL documentation](https:\u002F\u002Fdocs.aws.amazon.com\u002Faurora-dsql\u002Flatest\u002Fuserguide\u002F).\n- **`dsql_lint` unavailable or timing out:** See the Error Handling section of [dsql-lint.md](references\u002Fdsql-lint.md). Do not silently skip validation — inform the user and require explicit confirmation before proceeding with manual rules from [development-guide.md](references\u002Fdevelopment-guide.md).\n- **OCC serialization error:** Retry the transaction. If persistent, check for hot-key contention — see [troubleshooting.md](references\u002Ftroubleshooting.md).\n- **Transaction exceeds limits:** Split into batches under 3,000 rows — see [batched-migration.md](references\u002Fddl-migrations\u002Fbatched-migration.md).\n- **Token expiration mid-operation:** Generate a fresh IAM token — see [authentication-guide.md](references\u002Fauth\u002Fauthentication-guide.md). See [troubleshooting.md](references\u002Ftroubleshooting.md) for other issues.\n\n---\n\n## Additional Resources\n\n- [Aurora DSQL Documentation](https:\u002F\u002Fdocs.aws.amazon.com\u002Faurora-dsql\u002Flatest\u002Fuserguide\u002F)\n- [Code Samples Repository](https:\u002F\u002Fgithub.com\u002Faws-samples\u002Faurora-dsql-samples)\n- [PostgreSQL Compatibility](https:\u002F\u002Fdocs.aws.amazon.com\u002Faurora-dsql\u002Flatest\u002Fuserguide\u002Fworking-with-postgresql-compatibility.html)\n- [CloudFormation Resource](https:\u002F\u002Fdocs.aws.amazon.com\u002FAWSCloudFormation\u002Flatest\u002FUserGuide\u002Faws-resource-dsql-cluster.html)\n",{"data":50,"body":51},{"name":5,"description":7},{"type":52,"children":53},"root",[54,63,69,78,108,112,119,124,136,161,166,177,197,211,221,242,252,267,277,292,302,317,327,342,352,376,386,401,407,417,432,442,457,467,482,492,507,513,523,538,548,563,573,588,594,604,625,635,658,668,683,693,708,718,733,739,749,764,770,780,809,815,858,864,874,910,913,919,932,940,973,981,993,1001,1034,1059,1076,1090,1095,1344,1354,1381,1387,1406,1409,1415,1537,1540,1546,1552,1575,1640,1646,1674,1727,1762,1780,1786,1796,1806,1812,1903,1909,1920,1926,1975,1985,1991,2037,2080,2135,2141,2168,2186,2232,2350,2412,2437,2460,2485,2646,2683,2686,2692,2797,2800,2806,2848],{"type":55,"tag":56,"props":57,"children":59},"element","h1",{"id":58},"amazon-aurora-dsql-skill",[60],{"type":61,"value":62},"text","Amazon Aurora DSQL Skill",{"type":55,"tag":64,"props":65,"children":66},"p",{},[67],{"type":61,"value":68},"Aurora DSQL is a serverless, PostgreSQL-compatible distributed SQL database. This skill provides direct database interaction via MCP tools, schema management, migration support, and multi-tenant patterns.",{"type":55,"tag":64,"props":70,"children":71},{},[72],{"type":55,"tag":73,"props":74,"children":75},"strong",{},[76],{"type":61,"value":77},"Key capabilities:",{"type":55,"tag":79,"props":80,"children":81},"ul",{},[82,88,93,98,103],{"type":55,"tag":83,"props":84,"children":85},"li",{},[86],{"type":61,"value":87},"Direct query execution via MCP tools",{"type":55,"tag":83,"props":89,"children":90},{},[91],{"type":61,"value":92},"Schema management with DSQL constraints",{"type":55,"tag":83,"props":94,"children":95},{},[96],{"type":61,"value":97},"Migration support and safe schema evolution",{"type":55,"tag":83,"props":99,"children":100},{},[101],{"type":61,"value":102},"Multi-tenant isolation patterns",{"type":55,"tag":83,"props":104,"children":105},{},[106],{"type":61,"value":107},"IAM-based authentication",{"type":55,"tag":109,"props":110,"children":111},"hr",{},[],{"type":55,"tag":113,"props":114,"children":116},"h2",{"id":115},"reference-files",[117],{"type":61,"value":118},"Reference Files",{"type":55,"tag":64,"props":120,"children":121},{},[122],{"type":61,"value":123},"Load these files as needed for detailed guidance:",{"type":55,"tag":125,"props":126,"children":128},"h3",{"id":127},"development-guidemd",[129],{"type":55,"tag":130,"props":131,"children":133},"a",{"href":132},"references\u002Fdevelopment-guide.md",[134],{"type":61,"value":135},"development-guide.md",{"type":55,"tag":64,"props":137,"children":138},{},[139,144,146,151,153,159],{"type":55,"tag":73,"props":140,"children":141},{},[142],{"type":61,"value":143},"When:",{"type":61,"value":145}," ALWAYS load before implementing schema changes or database operations\n",{"type":55,"tag":73,"props":147,"children":148},{},[149],{"type":61,"value":150},"Contains:",{"type":61,"value":152}," ",{"type":55,"tag":130,"props":154,"children":156},{"href":155},"references\u002Fdevelopment-guide.md#best-practices",[157],{"type":61,"value":158},"Best Practices",{"type":61,"value":160},", DDL rules, connection patterns, transaction limits, data type serialization patterns, application-layer referential integrity instructions, security best practices",{"type":55,"tag":125,"props":162,"children":163},{"id":36},[164],{"type":61,"value":165},"MCP:",{"type":55,"tag":167,"props":168,"children":170},"h4",{"id":169},"mcp-setupmd",[171],{"type":55,"tag":130,"props":172,"children":174},{"href":173},"mcp\u002Fmcp-setup.md",[175],{"type":61,"value":176},"mcp-setup.md",{"type":55,"tag":64,"props":178,"children":179},{},[180,184,186,190,192],{"type":55,"tag":73,"props":181,"children":182},{},[183],{"type":61,"value":143},{"type":61,"value":185}," Always load for guidance using or updating the DSQL MCP server\n",{"type":55,"tag":73,"props":187,"children":188},{},[189],{"type":61,"value":150},{"type":61,"value":191}," Instructions for setting up the DSQL MCP server with 2 configuration options as\nsampled in ",{"type":55,"tag":130,"props":193,"children":195},{"href":194},"mcp\u002F.mcp.json",[196],{"type":61,"value":194},{"type":55,"tag":198,"props":199,"children":200},"ol",{},[201,206],{"type":55,"tag":83,"props":202,"children":203},{},[204],{"type":61,"value":205},"Documentation-Tools Only",{"type":55,"tag":83,"props":207,"children":208},{},[209],{"type":61,"value":210},"Database Operations (requires a cluster endpoint)",{"type":55,"tag":167,"props":212,"children":214},{"id":213},"mcp-toolsmd",[215],{"type":55,"tag":130,"props":216,"children":218},{"href":217},"mcp\u002Fmcp-tools.md",[219],{"type":61,"value":220},"mcp-tools.md",{"type":55,"tag":64,"props":222,"children":223},{},[224,228,230,234,236],{"type":55,"tag":73,"props":225,"children":226},{},[227],{"type":61,"value":143},{"type":61,"value":229}," Load when you need detailed MCP tool syntax and examples. PREFER MCP tools for ad-hoc queries — execute directly rather than writing scripts.\n",{"type":55,"tag":73,"props":231,"children":232},{},[233],{"type":61,"value":150},{"type":61,"value":235}," Tool parameters, detailed examples, usage patterns, ",{"type":55,"tag":130,"props":237,"children":239},{"href":238},"mcp\u002Ftools\u002Finput-validation.md",[240],{"type":61,"value":241},"input validation",{"type":55,"tag":125,"props":243,"children":245},{"id":244},"languagemd",[246],{"type":55,"tag":130,"props":247,"children":249},{"href":248},"references\u002Flanguage.md",[250],{"type":61,"value":251},"language.md",{"type":55,"tag":64,"props":253,"children":254},{},[255,259,261,265],{"type":55,"tag":73,"props":256,"children":257},{},[258],{"type":61,"value":143},{"type":61,"value":260}," MUST load when making language-specific implementation choices. ALWAYS prefer DSQL Connector when available.\n",{"type":55,"tag":73,"props":262,"children":263},{},[264],{"type":61,"value":150},{"type":61,"value":266}," Driver selection, framework patterns, connection code for Python\u002FJS\u002FGo\u002FJava\u002FRust",{"type":55,"tag":125,"props":268,"children":270},{"id":269},"dsql-examplesmd",[271],{"type":55,"tag":130,"props":272,"children":274},{"href":273},"references\u002Fdsql-examples.md",[275],{"type":61,"value":276},"dsql-examples.md",{"type":55,"tag":64,"props":278,"children":279},{},[280,284,286,290],{"type":55,"tag":73,"props":281,"children":282},{},[283],{"type":61,"value":143},{"type":61,"value":285}," Load when looking for specific implementation examples\n",{"type":55,"tag":73,"props":287,"children":288},{},[289],{"type":61,"value":150},{"type":61,"value":291}," Code examples, repository patterns, multi-tenant implementations",{"type":55,"tag":125,"props":293,"children":295},{"id":294},"troubleshootingmd",[296],{"type":55,"tag":130,"props":297,"children":299},{"href":298},"references\u002Ftroubleshooting.md",[300],{"type":61,"value":301},"troubleshooting.md",{"type":55,"tag":64,"props":303,"children":304},{},[305,309,311,315],{"type":55,"tag":73,"props":306,"children":307},{},[308],{"type":61,"value":143},{"type":61,"value":310}," Load when debugging errors or unexpected behavior. SHOULD always consult for OCC errors, connection failures, or unexpected query results.\n",{"type":55,"tag":73,"props":312,"children":313},{},[314],{"type":61,"value":150},{"type":61,"value":316}," Common pitfalls, error messages, solutions",{"type":55,"tag":125,"props":318,"children":320},{"id":319},"onboardingmd",[321],{"type":55,"tag":130,"props":322,"children":324},{"href":323},"references\u002Fonboarding.md",[325],{"type":61,"value":326},"onboarding.md",{"type":55,"tag":64,"props":328,"children":329},{},[330,334,336,340],{"type":55,"tag":73,"props":331,"children":332},{},[333],{"type":61,"value":143},{"type":61,"value":335}," User explicitly requests to \"Get started with DSQL\" or similar phrase\n",{"type":55,"tag":73,"props":337,"children":338},{},[339],{"type":61,"value":150},{"type":61,"value":341}," Interactive step-by-step guide for new users",{"type":55,"tag":125,"props":343,"children":345},{"id":344},"access-controlmd",[346],{"type":55,"tag":130,"props":347,"children":349},{"href":348},"references\u002Faccess-control.md",[350],{"type":61,"value":351},"access-control.md",{"type":55,"tag":64,"props":353,"children":354},{},[355,359,361,368,370,374],{"type":55,"tag":73,"props":356,"children":357},{},[358],{"type":61,"value":143},{"type":61,"value":360}," MUST load when creating database roles, granting permissions, setting up schemas for applications, or handling sensitive data. ALWAYS use scoped roles for applications — create database roles with ",{"type":55,"tag":362,"props":363,"children":365},"code",{"className":364},[],[366],{"type":61,"value":367},"dsql:DbConnect",{"type":61,"value":369},".\n",{"type":55,"tag":73,"props":371,"children":372},{},[373],{"type":61,"value":150},{"type":61,"value":375}," Scoped role setup, IAM-to-database role mapping, schema separation for sensitive data, role design patterns",{"type":55,"tag":125,"props":377,"children":379},{"id":378},"occ-retry-patternsmd",[380],{"type":55,"tag":130,"props":381,"children":383},{"href":382},"references\u002Focc-retry-patterns.md",[384],{"type":61,"value":385},"occ-retry-patterns.md",{"type":55,"tag":64,"props":387,"children":388},{},[389,393,395,399],{"type":55,"tag":73,"props":390,"children":391},{},[392],{"type":61,"value":143},{"type":61,"value":394}," MUST load when writing OCC retry code or mitigating commit-time conflicts\n",{"type":55,"tag":73,"props":396,"children":397},{},[398],{"type":61,"value":150},{"type":61,"value":400}," DSQL Connectors, manual retry pattern, conflict mitigation, idempotent transaction design",{"type":55,"tag":125,"props":402,"children":404},{"id":403},"ddl-migrations-modular",[405],{"type":61,"value":406},"DDL Migrations (modular):",{"type":55,"tag":167,"props":408,"children":410},{"id":409},"ddl-migrationsoverviewmd",[411],{"type":55,"tag":130,"props":412,"children":414},{"href":413},"references\u002Fddl-migrations\u002Foverview.md",[415],{"type":61,"value":416},"ddl-migrations\u002Foverview.md",{"type":55,"tag":64,"props":418,"children":419},{},[420,424,426,430],{"type":55,"tag":73,"props":421,"children":422},{},[423],{"type":61,"value":143},{"type":61,"value":425}," MUST load when performing DROP COLUMN, RENAME COLUMN, ALTER COLUMN TYPE, or DROP CONSTRAINT\n",{"type":55,"tag":73,"props":427,"children":428},{},[429],{"type":61,"value":150},{"type":61,"value":431}," Table recreation pattern overview, transaction rules, common verify & swap pattern",{"type":55,"tag":167,"props":433,"children":435},{"id":434},"ddl-migrationscolumn-operationsmd",[436],{"type":55,"tag":130,"props":437,"children":439},{"href":438},"references\u002Fddl-migrations\u002Fcolumn-operations.md",[440],{"type":61,"value":441},"ddl-migrations\u002Fcolumn-operations.md",{"type":55,"tag":64,"props":443,"children":444},{},[445,449,451,455],{"type":55,"tag":73,"props":446,"children":447},{},[448],{"type":61,"value":143},{"type":61,"value":450}," Load for DROP COLUMN, ALTER COLUMN TYPE, SET\u002FDROP NOT NULL, SET\u002FDROP DEFAULT migrations\n",{"type":55,"tag":73,"props":452,"children":453},{},[454],{"type":61,"value":150},{"type":61,"value":456}," Step-by-step migration patterns for column-level changes",{"type":55,"tag":167,"props":458,"children":460},{"id":459},"ddl-migrationsconstraint-operationsmd",[461],{"type":55,"tag":130,"props":462,"children":464},{"href":463},"references\u002Fddl-migrations\u002Fconstraint-operations.md",[465],{"type":61,"value":466},"ddl-migrations\u002Fconstraint-operations.md",{"type":55,"tag":64,"props":468,"children":469},{},[470,474,476,480],{"type":55,"tag":73,"props":471,"children":472},{},[473],{"type":61,"value":143},{"type":61,"value":475}," Load for ADD\u002FDROP CONSTRAINT, MODIFY PRIMARY KEY, column split\u002Fmerge migrations\n",{"type":55,"tag":73,"props":477,"children":478},{},[479],{"type":61,"value":150},{"type":61,"value":481}," Step-by-step migration patterns for constraint and structural changes",{"type":55,"tag":167,"props":483,"children":485},{"id":484},"ddl-migrationsbatched-migrationmd",[486],{"type":55,"tag":130,"props":487,"children":489},{"href":488},"references\u002Fddl-migrations\u002Fbatched-migration.md",[490],{"type":61,"value":491},"ddl-migrations\u002Fbatched-migration.md",{"type":55,"tag":64,"props":493,"children":494},{},[495,499,501,505],{"type":55,"tag":73,"props":496,"children":497},{},[498],{"type":61,"value":143},{"type":61,"value":500}," Load when migrating tables exceeding 3,000 rows\n",{"type":55,"tag":73,"props":502,"children":503},{},[504],{"type":61,"value":150},{"type":61,"value":506}," OFFSET-based and cursor-based batching patterns, progress tracking, error handling",{"type":55,"tag":125,"props":508,"children":510},{"id":509},"mysql-migrations-modular",[511],{"type":61,"value":512},"MySQL Migrations (modular):",{"type":55,"tag":167,"props":514,"children":516},{"id":515},"mysql-migrationstype-mappingmd",[517],{"type":55,"tag":130,"props":518,"children":520},{"href":519},"references\u002Fmysql-migrations\u002Ftype-mapping.md",[521],{"type":61,"value":522},"mysql-migrations\u002Ftype-mapping.md",{"type":55,"tag":64,"props":524,"children":525},{},[526,530,532,536],{"type":55,"tag":73,"props":527,"children":528},{},[529],{"type":61,"value":143},{"type":61,"value":531}," MUST load when migrating MySQL schemas to DSQL\n",{"type":55,"tag":73,"props":533,"children":534},{},[535],{"type":61,"value":150},{"type":61,"value":537}," MySQL data type mappings, feature alternatives, DDL operation mapping",{"type":55,"tag":167,"props":539,"children":541},{"id":540},"mysql-migrationsddl-operationsmd",[542],{"type":55,"tag":130,"props":543,"children":545},{"href":544},"references\u002Fmysql-migrations\u002Fddl-operations.md",[546],{"type":61,"value":547},"mysql-migrations\u002Fddl-operations.md",{"type":55,"tag":64,"props":549,"children":550},{},[551,555,557,561],{"type":55,"tag":73,"props":552,"children":553},{},[554],{"type":61,"value":143},{"type":61,"value":556}," Load when translating MySQL DDL operations to DSQL equivalents\n",{"type":55,"tag":73,"props":558,"children":559},{},[560],{"type":61,"value":150},{"type":61,"value":562}," ALTER COLUMN, DROP COLUMN, AUTO_INCREMENT, ENUM, SET, FOREIGN KEY migration patterns",{"type":55,"tag":167,"props":564,"children":566},{"id":565},"mysql-migrationsfull-examplemd",[567],{"type":55,"tag":130,"props":568,"children":570},{"href":569},"references\u002Fmysql-migrations\u002Ffull-example.md",[571],{"type":61,"value":572},"mysql-migrations\u002Ffull-example.md",{"type":55,"tag":64,"props":574,"children":575},{},[576,580,582,586],{"type":55,"tag":73,"props":577,"children":578},{},[579],{"type":61,"value":143},{"type":61,"value":581}," Load when migrating a complete MySQL table to DSQL\n",{"type":55,"tag":73,"props":583,"children":584},{},[585],{"type":61,"value":150},{"type":61,"value":587}," End-to-end MySQL CREATE TABLE migration example with decision summary",{"type":55,"tag":125,"props":589,"children":591},{"id":590},"postgresql-migrations-modular",[592],{"type":61,"value":593},"PostgreSQL Migrations (modular):",{"type":55,"tag":167,"props":595,"children":597},{"id":596},"pg-migrationstype-mappingmd",[598],{"type":55,"tag":130,"props":599,"children":601},{"href":600},"references\u002Fpg-migrations\u002Ftype-mapping.md",[602],{"type":61,"value":603},"pg-migrations\u002Ftype-mapping.md",{"type":55,"tag":64,"props":605,"children":606},{},[607,611,613,617,619],{"type":55,"tag":73,"props":608,"children":609},{},[610],{"type":61,"value":143},{"type":61,"value":612}," MUST load for PostgreSQL → DSQL type questions\n",{"type":55,"tag":73,"props":614,"children":615},{},[616],{"type":61,"value":150},{"type":61,"value":618}," C collation rules, NUMERIC precision, JSON\u002FJSONB, types mapped to TEXT by ",{"type":55,"tag":362,"props":620,"children":622},{"className":621},[],[623],{"type":61,"value":624},"dsql_lint",{"type":55,"tag":167,"props":626,"children":628},{"id":627},"pg-migrationsfk-replacementmd",[629],{"type":55,"tag":130,"props":630,"children":632},{"href":631},"references\u002Fpg-migrations\u002Ffk-replacement.md",[633],{"type":61,"value":634},"pg-migrations\u002Ffk-replacement.md",{"type":55,"tag":64,"props":636,"children":637},{},[638,642,644,648,650,656],{"type":55,"tag":73,"props":639,"children":640},{},[641],{"type":61,"value":143},{"type":61,"value":643}," MUST load for foreign-key validation code generation\n",{"type":55,"tag":73,"props":645,"children":646},{},[647],{"type":61,"value":150},{"type":61,"value":649}," Tenant-scoped ",{"type":55,"tag":362,"props":651,"children":653},{"className":652},[],[654],{"type":61,"value":655},"validate_fk_*()",{"type":61,"value":657}," template, cascade handling",{"type":55,"tag":167,"props":659,"children":661},{"id":660},"pg-migrationsindex-conversionmd",[662],{"type":55,"tag":130,"props":663,"children":665},{"href":664},"references\u002Fpg-migrations\u002Findex-conversion.md",[666],{"type":61,"value":667},"pg-migrations\u002Findex-conversion.md",{"type":55,"tag":64,"props":669,"children":670},{},[671,675,677,681],{"type":55,"tag":73,"props":672,"children":673},{},[674],{"type":61,"value":143},{"type":61,"value":676}," MUST load for unfixable index diagnostics\n",{"type":55,"tag":73,"props":678,"children":679},{},[680],{"type":61,"value":150},{"type":61,"value":682}," GIN\u002FGiST\u002FBRIN → btree, partial and expression index conversion, async index status",{"type":55,"tag":167,"props":684,"children":686},{"id":685},"pg-migrationsschema-objectsmd",[687],{"type":55,"tag":130,"props":688,"children":690},{"href":689},"references\u002Fpg-migrations\u002Fschema-objects.md",[691],{"type":61,"value":692},"pg-migrations\u002Fschema-objects.md",{"type":55,"tag":64,"props":694,"children":695},{},[696,700,702,706],{"type":55,"tag":73,"props":697,"children":698},{},[699],{"type":61,"value":143},{"type":61,"value":701}," MUST load for ENUM, materialized views, extensions, or multi-schema handling\n",{"type":55,"tag":73,"props":703,"children":704},{},[705],{"type":61,"value":150},{"type":61,"value":707}," ENUM → CHECK, views, temp\u002Fpartitioned\u002Finherited tables, role\u002FIAM mapping",{"type":55,"tag":167,"props":709,"children":711},{"id":710},"pg-migrationsmulti-regionmd",[712],{"type":55,"tag":130,"props":713,"children":715},{"href":714},"references\u002Fpg-migrations\u002Fmulti-region.md",[716],{"type":61,"value":717},"pg-migrations\u002Fmulti-region.md",{"type":55,"tag":64,"props":719,"children":720},{},[721,725,727,731],{"type":55,"tag":73,"props":722,"children":723},{},[724],{"type":61,"value":143},{"type":61,"value":726}," Load for multi-region, active-active, or HA questions\n",{"type":55,"tag":73,"props":728,"children":729},{},[730],{"type":61,"value":150},{"type":61,"value":732}," Architecture patterns, geographic partitioning",{"type":55,"tag":125,"props":734,"children":736},{"id":735},"orm-guides",[737],{"type":61,"value":738},"ORM Guides:",{"type":55,"tag":167,"props":740,"children":742},{"id":741},"orm-guidesoverviewmd",[743],{"type":55,"tag":130,"props":744,"children":746},{"href":745},"references\u002Form-guides\u002Foverview.md",[747],{"type":61,"value":748},"orm-guides\u002Foverview.md",{"type":55,"tag":64,"props":750,"children":751},{},[752,756,758,762],{"type":55,"tag":73,"props":753,"children":754},{},[755],{"type":61,"value":143},{"type":61,"value":757}," Load when migrating any ORM to DSQL\n",{"type":55,"tag":73,"props":759,"children":760},{},[761],{"type":61,"value":150},{"type":61,"value":763}," Adapter names and key gotchas for Django, Hibernate, Rails, SQLAlchemy",{"type":55,"tag":125,"props":765,"children":767},{"id":766},"data-loading",[768],{"type":61,"value":769},"Data Loading:",{"type":55,"tag":167,"props":771,"children":773},{"id":772},"data-loadingmd",[774],{"type":55,"tag":130,"props":775,"children":777},{"href":776},"references\u002Fdata-loading.md",[778],{"type":61,"value":779},"data-loading.md",{"type":55,"tag":64,"props":781,"children":782},{},[783,787,789,795,799,801,807],{"type":55,"tag":73,"props":784,"children":785},{},[786],{"type":61,"value":143},{"type":61,"value":788}," Load when planning or running bulk loads with ",{"type":55,"tag":362,"props":790,"children":792},{"className":791},[],[793],{"type":61,"value":794},"aurora-dsql-loader",{"type":55,"tag":73,"props":796,"children":797},{},[798],{"type":61,"value":150},{"type":61,"value":800}," Fresh-vs-warm partitions, resume\u002Fretry, ",{"type":55,"tag":362,"props":802,"children":804},{"className":803},[],[805],{"type":61,"value":806},"--on-conflict",{"type":61,"value":808}," semantics, throughput diagnostics",{"type":55,"tag":125,"props":810,"children":812},{"id":811},"query-plan-explainability-modular",[813],{"type":61,"value":814},"Query Plan Explainability (modular):",{"type":55,"tag":64,"props":816,"children":817},{},[818,822,824,830,832,838,839,845,846,852,856],{"type":55,"tag":73,"props":819,"children":820},{},[821],{"type":61,"value":143},{"type":61,"value":823}," MUST load all four at Workflow 8 Phase 0 — ",{"type":55,"tag":130,"props":825,"children":827},{"href":826},"references\u002Fquery-plan\u002Fplan-interpretation.md",[828],{"type":61,"value":829},"query-plan\u002Fplan-interpretation.md",{"type":61,"value":831},", ",{"type":55,"tag":130,"props":833,"children":835},{"href":834},"references\u002Fquery-plan\u002Fcatalog-queries.md",[836],{"type":61,"value":837},"query-plan\u002Fcatalog-queries.md",{"type":61,"value":831},{"type":55,"tag":130,"props":840,"children":842},{"href":841},"references\u002Fquery-plan\u002Fguc-experiments.md",[843],{"type":61,"value":844},"query-plan\u002Fguc-experiments.md",{"type":61,"value":831},{"type":55,"tag":130,"props":847,"children":849},{"href":848},"references\u002Fquery-plan\u002Freport-format.md",[850],{"type":61,"value":851},"query-plan\u002Freport-format.md",{"type":55,"tag":73,"props":853,"children":854},{},[855],{"type":61,"value":150},{"type":61,"value":857}," DSQL node types + Node Duration math + estimation-error bands, pg_class\u002Fpg_stats\u002Fpg_indexes SQL + correlated-predicate verification, GUC experiment procedures + 30-second skip protocol, required report structure + element checklist + support request template",{"type":55,"tag":125,"props":859,"children":861},{"id":860},"sql-compatibility-validation",[862],{"type":61,"value":863},"SQL Compatibility Validation:",{"type":55,"tag":167,"props":865,"children":867},{"id":866},"dsql-lintmd",[868],{"type":55,"tag":130,"props":869,"children":871},{"href":870},"references\u002Fdsql-lint.md",[872],{"type":61,"value":873},"dsql-lint.md",{"type":55,"tag":64,"props":875,"children":876},{},[877,881,883,888,890,896,898,902,903,908],{"type":55,"tag":73,"props":878,"children":879},{},[880],{"type":61,"value":143},{"type":61,"value":882}," MUST load before running ",{"type":55,"tag":362,"props":884,"children":886},{"className":885},[],[887],{"type":61,"value":624},{"type":61,"value":889},", processing externally-sourced SQL (pg_dump, ORM migrations, user-pasted DDL), or resolving ",{"type":55,"tag":362,"props":891,"children":893},{"className":892},[],[894],{"type":61,"value":895},"fixed_with_warning",{"type":61,"value":897}," \u002F unfixable diagnostics\n",{"type":55,"tag":73,"props":899,"children":900},{},[901],{"type":61,"value":150},{"type":61,"value":152},{"type":55,"tag":362,"props":904,"children":906},{"className":905},[],[907],{"type":61,"value":624},{"type":61,"value":909}," MCP tool reference, fix statuses, ORM integration, unfixable error resolution",{"type":55,"tag":109,"props":911,"children":912},{},[],{"type":55,"tag":113,"props":914,"children":916},{"id":915},"mcp-tools-available",[917],{"type":61,"value":918},"MCP Tools Available",{"type":55,"tag":64,"props":920,"children":921},{},[922,924,930],{"type":61,"value":923},"The ",{"type":55,"tag":362,"props":925,"children":927},{"className":926},[],[928],{"type":61,"value":929},"aurora-dsql",{"type":61,"value":931}," MCP server provides these tools:",{"type":55,"tag":64,"props":933,"children":934},{},[935],{"type":55,"tag":73,"props":936,"children":937},{},[938],{"type":61,"value":939},"Database Operations:",{"type":55,"tag":198,"props":941,"children":942},{},[943,953,963],{"type":55,"tag":83,"props":944,"children":945},{},[946,951],{"type":55,"tag":73,"props":947,"children":948},{},[949],{"type":61,"value":950},"readonly_query",{"type":61,"value":952}," - Execute SELECT queries (returns list of dicts)",{"type":55,"tag":83,"props":954,"children":955},{},[956,961],{"type":55,"tag":73,"props":957,"children":958},{},[959],{"type":61,"value":960},"transact",{"type":61,"value":962}," - Execute DDL\u002FDML statements in transaction (takes list of SQL statements)",{"type":55,"tag":83,"props":964,"children":965},{},[966,971],{"type":55,"tag":73,"props":967,"children":968},{},[969],{"type":61,"value":970},"get_schema",{"type":61,"value":972}," - Get table structure for a specific table",{"type":55,"tag":64,"props":974,"children":975},{},[976],{"type":55,"tag":73,"props":977,"children":978},{},[979],{"type":61,"value":980},"SQL Validation:",{"type":55,"tag":198,"props":982,"children":983},{},[984],{"type":55,"tag":83,"props":985,"children":986},{},[987,991],{"type":55,"tag":73,"props":988,"children":989},{},[990],{"type":61,"value":624},{"type":61,"value":992}," - Validate SQL for DSQL compatibility and optionally auto-fix issues. Use before executing externally-sourced SQL.",{"type":55,"tag":64,"props":994,"children":995},{},[996],{"type":55,"tag":73,"props":997,"children":998},{},[999],{"type":61,"value":1000},"Documentation & Knowledge:",{"type":55,"tag":198,"props":1002,"children":1003},{},[1004,1014,1024],{"type":55,"tag":83,"props":1005,"children":1006},{},[1007,1012],{"type":55,"tag":73,"props":1008,"children":1009},{},[1010],{"type":61,"value":1011},"dsql_search_documentation",{"type":61,"value":1013}," - Search Aurora DSQL documentation",{"type":55,"tag":83,"props":1015,"children":1016},{},[1017,1022],{"type":55,"tag":73,"props":1018,"children":1019},{},[1020],{"type":61,"value":1021},"dsql_read_documentation",{"type":61,"value":1023}," - Read specific documentation pages",{"type":55,"tag":83,"props":1025,"children":1026},{},[1027,1032],{"type":55,"tag":73,"props":1028,"children":1029},{},[1030],{"type":61,"value":1031},"dsql_recommend",{"type":61,"value":1033}," - Get DSQL best practice recommendations",{"type":55,"tag":64,"props":1035,"children":1036},{},[1037,1042,1044,1050,1052,1057],{"type":55,"tag":73,"props":1038,"children":1039},{},[1040],{"type":61,"value":1041},"Note:",{"type":61,"value":1043}," There is no ",{"type":55,"tag":362,"props":1045,"children":1047},{"className":1046},[],[1048],{"type":61,"value":1049},"list_tables",{"type":61,"value":1051}," tool. Use ",{"type":55,"tag":362,"props":1053,"children":1055},{"className":1054},[],[1056],{"type":61,"value":950},{"type":61,"value":1058}," with information_schema.",{"type":55,"tag":64,"props":1060,"children":1061},{},[1062,1064,1068,1070,1074],{"type":61,"value":1063},"See ",{"type":55,"tag":130,"props":1065,"children":1066},{"href":173},[1067],{"type":61,"value":176},{"type":61,"value":1069}," for detailed setup instructions.\nSee ",{"type":55,"tag":130,"props":1071,"children":1072},{"href":217},[1073],{"type":61,"value":220},{"type":61,"value":1075}," for detailed usage and examples.",{"type":55,"tag":125,"props":1077,"children":1079},{"id":1078},"aws-knowledge-mcp-awsknowledge",[1080,1082,1088],{"type":61,"value":1081},"AWS Knowledge MCP (",{"type":55,"tag":362,"props":1083,"children":1085},{"className":1084},[],[1086],{"type":61,"value":1087},"awsknowledge",{"type":61,"value":1089},")",{"type":55,"tag":64,"props":1091,"children":1092},{},[1093],{"type":61,"value":1094},"Consult for verifying DSQL service limits before advising users. The numeric limits below are\ndefaults that may change — when a user's decision depends on an exact limit, verify it first:",{"type":55,"tag":1096,"props":1097,"children":1098},"table",{},[1099,1123],{"type":55,"tag":1100,"props":1101,"children":1102},"thead",{},[1103],{"type":55,"tag":1104,"props":1105,"children":1106},"tr",{},[1107,1113,1118],{"type":55,"tag":1108,"props":1109,"children":1110},"th",{},[1111],{"type":61,"value":1112},"Limit",{"type":55,"tag":1108,"props":1114,"children":1115},{},[1116],{"type":61,"value":1117},"Default",{"type":55,"tag":1108,"props":1119,"children":1120},{},[1121],{"type":61,"value":1122},"Verify query",{"type":55,"tag":1124,"props":1125,"children":1126},"tbody",{},[1127,1150,1171,1192,1214,1236,1257,1279,1300,1322],{"type":55,"tag":1104,"props":1128,"children":1129},{},[1130,1136,1141],{"type":55,"tag":1131,"props":1132,"children":1133},"td",{},[1134],{"type":61,"value":1135},"Max rows per transaction",{"type":55,"tag":1131,"props":1137,"children":1138},{},[1139],{"type":61,"value":1140},"3,000",{"type":55,"tag":1131,"props":1142,"children":1143},{},[1144],{"type":55,"tag":362,"props":1145,"children":1147},{"className":1146},[],[1148],{"type":61,"value":1149},"aurora dsql transaction limits",{"type":55,"tag":1104,"props":1151,"children":1152},{},[1153,1158,1163],{"type":55,"tag":1131,"props":1154,"children":1155},{},[1156],{"type":61,"value":1157},"Max data size per transaction",{"type":55,"tag":1131,"props":1159,"children":1160},{},[1161],{"type":61,"value":1162},"10 MiB",{"type":55,"tag":1131,"props":1164,"children":1165},{},[1166],{"type":55,"tag":362,"props":1167,"children":1169},{"className":1168},[],[1170],{"type":61,"value":1149},{"type":55,"tag":1104,"props":1172,"children":1173},{},[1174,1179,1184],{"type":55,"tag":1131,"props":1175,"children":1176},{},[1177],{"type":61,"value":1178},"Max transaction duration",{"type":55,"tag":1131,"props":1180,"children":1181},{},[1182],{"type":61,"value":1183},"5 minutes",{"type":55,"tag":1131,"props":1185,"children":1186},{},[1187],{"type":55,"tag":362,"props":1188,"children":1190},{"className":1189},[],[1191],{"type":61,"value":1149},{"type":55,"tag":1104,"props":1193,"children":1194},{},[1195,1200,1205],{"type":55,"tag":1131,"props":1196,"children":1197},{},[1198],{"type":61,"value":1199},"Max connections per cluster",{"type":55,"tag":1131,"props":1201,"children":1202},{},[1203],{"type":61,"value":1204},"10,000",{"type":55,"tag":1131,"props":1206,"children":1207},{},[1208],{"type":55,"tag":362,"props":1209,"children":1211},{"className":1210},[],[1212],{"type":61,"value":1213},"aurora dsql connection limits",{"type":55,"tag":1104,"props":1215,"children":1216},{},[1217,1222,1227],{"type":55,"tag":1131,"props":1218,"children":1219},{},[1220],{"type":61,"value":1221},"Auth token expiry",{"type":55,"tag":1131,"props":1223,"children":1224},{},[1225],{"type":61,"value":1226},"15 minutes",{"type":55,"tag":1131,"props":1228,"children":1229},{},[1230],{"type":55,"tag":362,"props":1231,"children":1233},{"className":1232},[],[1234],{"type":61,"value":1235},"aurora dsql authentication token",{"type":55,"tag":1104,"props":1237,"children":1238},{},[1239,1244,1249],{"type":55,"tag":1131,"props":1240,"children":1241},{},[1242],{"type":61,"value":1243},"Max connection duration",{"type":55,"tag":1131,"props":1245,"children":1246},{},[1247],{"type":61,"value":1248},"60 minutes",{"type":55,"tag":1131,"props":1250,"children":1251},{},[1252],{"type":55,"tag":362,"props":1253,"children":1255},{"className":1254},[],[1256],{"type":61,"value":1213},{"type":55,"tag":1104,"props":1258,"children":1259},{},[1260,1265,1270],{"type":55,"tag":1131,"props":1261,"children":1262},{},[1263],{"type":61,"value":1264},"Max indexes per table",{"type":55,"tag":1131,"props":1266,"children":1267},{},[1268],{"type":61,"value":1269},"24",{"type":55,"tag":1131,"props":1271,"children":1272},{},[1273],{"type":55,"tag":362,"props":1274,"children":1276},{"className":1275},[],[1277],{"type":61,"value":1278},"aurora dsql index limits",{"type":55,"tag":1104,"props":1280,"children":1281},{},[1282,1287,1292],{"type":55,"tag":1131,"props":1283,"children":1284},{},[1285],{"type":61,"value":1286},"Max columns per index",{"type":55,"tag":1131,"props":1288,"children":1289},{},[1290],{"type":61,"value":1291},"8",{"type":55,"tag":1131,"props":1293,"children":1294},{},[1295],{"type":55,"tag":362,"props":1296,"children":1298},{"className":1297},[],[1299],{"type":61,"value":1278},{"type":55,"tag":1104,"props":1301,"children":1302},{},[1303,1308,1313],{"type":55,"tag":1131,"props":1304,"children":1305},{},[1306],{"type":61,"value":1307},"IDENTITY\u002FSEQUENCE CACHE values",{"type":55,"tag":1131,"props":1309,"children":1310},{},[1311],{"type":61,"value":1312},"1 or >= 65536",{"type":55,"tag":1131,"props":1314,"children":1315},{},[1316],{"type":55,"tag":362,"props":1317,"children":1319},{"className":1318},[],[1320],{"type":61,"value":1321},"aurora dsql sequence cache",{"type":55,"tag":1104,"props":1323,"children":1324},{},[1325,1330,1335],{"type":55,"tag":1131,"props":1326,"children":1327},{},[1328],{"type":61,"value":1329},"Supported column data types",{"type":55,"tag":1131,"props":1331,"children":1332},{},[1333],{"type":61,"value":1334},"See docs",{"type":55,"tag":1131,"props":1336,"children":1337},{},[1338],{"type":55,"tag":362,"props":1339,"children":1341},{"className":1340},[],[1342],{"type":61,"value":1343},"aurora dsql supported data types",{"type":55,"tag":64,"props":1345,"children":1346},{},[1347,1352],{"type":55,"tag":73,"props":1348,"children":1349},{},[1350],{"type":61,"value":1351},"When to verify:",{"type":61,"value":1353}," Before recommending batch sizes, connection pool settings, or schema designs where hitting a limit would cause failures; any time the exact number can affect user decision.",{"type":55,"tag":64,"props":1355,"children":1356},{},[1357,1362,1364,1369,1371,1379],{"type":55,"tag":73,"props":1358,"children":1359},{},[1360],{"type":61,"value":1361},"Fallback:",{"type":61,"value":1363}," If ",{"type":55,"tag":362,"props":1365,"children":1367},{"className":1366},[],[1368],{"type":61,"value":1087},{"type":61,"value":1370}," is unavailable, use the defaults above and flag that limits should be verified against ",{"type":55,"tag":130,"props":1372,"children":1376},{"href":1373,"rel":1374},"https:\u002F\u002Fdocs.aws.amazon.com\u002Faurora-dsql\u002Flatest\u002Fuserguide\u002F",[1375],"nofollow",[1377],{"type":61,"value":1378},"DSQL documentation",{"type":61,"value":1380},".",{"type":55,"tag":113,"props":1382,"children":1384},{"id":1383},"cli-scripts-available",[1385],{"type":61,"value":1386},"CLI Scripts Available",{"type":55,"tag":64,"props":1388,"children":1389},{},[1390,1392,1397,1399,1404],{"type":61,"value":1391},"Bash scripts in ",{"type":55,"tag":130,"props":1393,"children":1395},{"href":1394},"scripts\u002F",[1396],{"type":61,"value":1394},{"type":61,"value":1398}," for cluster management (create, delete, list, cluster info), psql connection, and bulk data loading from local\u002Fs3 csv\u002Ftsv\u002Fparquet files.\nSee ",{"type":55,"tag":130,"props":1400,"children":1402},{"href":1401},"scripts\u002FREADME.md",[1403],{"type":61,"value":1401},{"type":61,"value":1405}," for usage and hook configuration.",{"type":55,"tag":109,"props":1407,"children":1408},{},[],{"type":55,"tag":113,"props":1410,"children":1412},{"id":1411},"quick-start",[1413],{"type":61,"value":1414},"Quick Start",{"type":55,"tag":198,"props":1416,"children":1417},{},[1418,1450,1494],{"type":55,"tag":83,"props":1419,"children":1420},{},[1421,1426,1428,1433,1435,1441,1443,1448],{"type":55,"tag":73,"props":1422,"children":1423},{},[1424],{"type":61,"value":1425},"Explore:",{"type":61,"value":1427}," Use ",{"type":55,"tag":362,"props":1429,"children":1431},{"className":1430},[],[1432],{"type":61,"value":950},{"type":61,"value":1434}," with ",{"type":55,"tag":362,"props":1436,"children":1438},{"className":1437},[],[1439],{"type":61,"value":1440},"information_schema",{"type":61,"value":1442}," to list tables. Use ",{"type":55,"tag":362,"props":1444,"children":1446},{"className":1445},[],[1447],{"type":61,"value":970},{"type":61,"value":1449}," for table structure.",{"type":55,"tag":83,"props":1451,"children":1452},{},[1453,1458,1459,1464,1466,1471,1473,1479,1481,1485,1487,1493],{"type":55,"tag":73,"props":1454,"children":1455},{},[1456],{"type":61,"value":1457},"Query:",{"type":61,"value":1427},{"type":55,"tag":362,"props":1460,"children":1462},{"className":1461},[],[1463],{"type":61,"value":950},{"type":61,"value":1465}," for SELECT queries. ",{"type":55,"tag":73,"props":1467,"children":1468},{},[1469],{"type":61,"value":1470},"MUST",{"type":61,"value":1472}," include ",{"type":55,"tag":362,"props":1474,"children":1476},{"className":1475},[],[1477],{"type":61,"value":1478},"tenant_id",{"type":61,"value":1480}," in WHERE for multi-tenant apps. ",{"type":55,"tag":73,"props":1482,"children":1483},{},[1484],{"type":61,"value":1470},{"type":61,"value":1486}," build SQL with ",{"type":55,"tag":362,"props":1488,"children":1490},{"className":1489},[],[1491],{"type":61,"value":1492},"safe_query.build()",{"type":61,"value":1380},{"type":55,"tag":83,"props":1495,"children":1496},{},[1497,1502,1503,1508,1510,1514,1516,1520,1522,1528,1530,1535],{"type":55,"tag":73,"props":1498,"children":1499},{},[1500],{"type":61,"value":1501},"Schema changes:",{"type":61,"value":1427},{"type":55,"tag":362,"props":1504,"children":1506},{"className":1505},[],[1507],{"type":61,"value":960},{"type":61,"value":1509}," with one DDL per transaction. ",{"type":55,"tag":73,"props":1511,"children":1512},{},[1513],{"type":61,"value":1470},{"type":61,"value":1515}," batch DML under 3,000 rows. ",{"type":55,"tag":73,"props":1517,"children":1518},{},[1519],{"type":61,"value":1470},{"type":61,"value":1521}," use ",{"type":55,"tag":362,"props":1523,"children":1525},{"className":1524},[],[1526],{"type":61,"value":1527},"CREATE INDEX ASYNC",{"type":61,"value":1529}," in a separate call. Use ",{"type":55,"tag":362,"props":1531,"children":1533},{"className":1532},[],[1534],{"type":61,"value":624},{"type":61,"value":1536}," to validate first.",{"type":55,"tag":109,"props":1538,"children":1539},{},[],{"type":55,"tag":113,"props":1541,"children":1543},{"id":1542},"common-workflows",[1544],{"type":61,"value":1545},"Common Workflows",{"type":55,"tag":125,"props":1547,"children":1549},{"id":1548},"workflow-1-create-multi-tenant-schema",[1550],{"type":61,"value":1551},"Workflow 1: Create Multi-Tenant Schema",{"type":55,"tag":198,"props":1553,"children":1554},{},[1555,1560,1565,1570],{"type":55,"tag":83,"props":1556,"children":1557},{},[1558],{"type":61,"value":1559},"Create main table with tenant_id column using transact",{"type":55,"tag":83,"props":1561,"children":1562},{},[1563],{"type":61,"value":1564},"Create async index on tenant_id in separate transact call",{"type":55,"tag":83,"props":1566,"children":1567},{},[1568],{"type":61,"value":1569},"Create composite indexes for common query patterns (separate transact calls)",{"type":55,"tag":83,"props":1571,"children":1572},{},[1573],{"type":61,"value":1574},"Verify schema with get_schema",{"type":55,"tag":79,"props":1576,"children":1577},{},[1578,1583,1595,1606],{"type":55,"tag":83,"props":1579,"children":1580},{},[1581],{"type":61,"value":1582},"MUST include tenant_id in all tables",{"type":55,"tag":83,"props":1584,"children":1585},{},[1586,1588,1593],{"type":61,"value":1587},"MUST use ",{"type":55,"tag":362,"props":1589,"children":1591},{"className":1590},[],[1592],{"type":61,"value":1527},{"type":61,"value":1594}," exclusively",{"type":55,"tag":83,"props":1596,"children":1597},{},[1598,1600],{"type":61,"value":1599},"MUST issue each DDL in its own transact call: ",{"type":55,"tag":362,"props":1601,"children":1603},{"className":1602},[],[1604],{"type":61,"value":1605},"transact([\"CREATE TABLE ...\"])",{"type":55,"tag":83,"props":1607,"children":1608},{},[1609,1611,1617,1619,1625,1627,1632,1634],{"type":61,"value":1610},"MUST serialize arrays into a single-column representation; PREFER ",{"type":55,"tag":362,"props":1612,"children":1614},{"className":1613},[],[1615],{"type":61,"value":1616},"JSONB",{"type":61,"value":1618}," (operators work directly); MAY use ",{"type":55,"tag":362,"props":1620,"children":1622},{"className":1621},[],[1623],{"type":61,"value":1624},"TEXT",{"type":61,"value":1626}," when the column is opaque to the database; ASK the user. For ",{"type":55,"tag":362,"props":1628,"children":1630},{"className":1629},[],[1631],{"type":61,"value":1616},{"type":61,"value":1633}," arrays, expand at query time with ",{"type":55,"tag":362,"props":1635,"children":1637},{"className":1636},[],[1638],{"type":61,"value":1639},"jsonb_array_elements_text(data)",{"type":55,"tag":125,"props":1641,"children":1643},{"id":1642},"workflow-2-safe-data-migration",[1644],{"type":61,"value":1645},"Workflow 2: Safe Data Migration",{"type":55,"tag":64,"props":1647,"children":1648},{},[1649,1651,1657,1659,1664,1666,1672],{"type":61,"value":1650},"Every DDL statement generated in this workflow MUST be validated with ",{"type":55,"tag":362,"props":1652,"children":1654},{"className":1653},[],[1655],{"type":61,"value":1656},"dsql_lint(fix=true)",{"type":61,"value":1658}," before its ",{"type":55,"tag":362,"props":1660,"children":1662},{"className":1661},[],[1663],{"type":61,"value":960},{"type":61,"value":1665}," call — applies to step 2 (ADD COLUMN) and step 5 (async index). DML (",{"type":55,"tag":362,"props":1667,"children":1669},{"className":1668},[],[1670],{"type":61,"value":1671},"UPDATE",{"type":61,"value":1673}," in step 3) does not require linting.",{"type":55,"tag":198,"props":1675,"children":1676},{},[1677,1694,1705,1710,1715],{"type":55,"tag":83,"props":1678,"children":1679},{},[1680,1682,1688,1690],{"type":61,"value":1681},"Validate ALTER TABLE DDL with ",{"type":55,"tag":362,"props":1683,"children":1685},{"className":1684},[],[1686],{"type":61,"value":1687},"dsql_lint(sql=..., fix=true)",{"type":61,"value":1689}," — handle diagnostics per ",{"type":55,"tag":130,"props":1691,"children":1692},{"href":870},[1693],{"type":61,"value":873},{"type":55,"tag":83,"props":1695,"children":1696},{},[1697,1699],{"type":61,"value":1698},"Add column using transact: ",{"type":55,"tag":362,"props":1700,"children":1702},{"className":1701},[],[1703],{"type":61,"value":1704},"transact([\"ALTER TABLE ... ADD COLUMN ...\"])",{"type":55,"tag":83,"props":1706,"children":1707},{},[1708],{"type":61,"value":1709},"Populate existing rows with UPDATE in separate transact calls (batched under 3,000 rows)",{"type":55,"tag":83,"props":1711,"children":1712},{},[1713],{"type":61,"value":1714},"Verify migration with readonly_query using COUNT",{"type":55,"tag":83,"props":1716,"children":1717},{},[1718,1720,1725],{"type":61,"value":1719},"If an index is needed: validate CREATE INDEX ASYNC DDL with ",{"type":55,"tag":362,"props":1721,"children":1723},{"className":1722},[],[1724],{"type":61,"value":1687},{"type":61,"value":1726},", then create via transact",{"type":55,"tag":79,"props":1728,"children":1729},{},[1730,1742,1747,1752,1757],{"type":55,"tag":83,"props":1731,"children":1732},{},[1733,1735,1740],{"type":61,"value":1734},"MUST validate every externally-sourced or generated DDL statement with ",{"type":55,"tag":362,"props":1736,"children":1738},{"className":1737},[],[1739],{"type":61,"value":624},{"type":61,"value":1741}," before executing",{"type":55,"tag":83,"props":1743,"children":1744},{},[1745],{"type":61,"value":1746},"MUST add column first, populate later",{"type":55,"tag":83,"props":1748,"children":1749},{},[1750],{"type":61,"value":1751},"MUST issue ADD COLUMN with only name and type; apply DEFAULT via separate UPDATE",{"type":55,"tag":83,"props":1753,"children":1754},{},[1755],{"type":61,"value":1756},"MUST batch updates under 3,000 rows in separate transact calls",{"type":55,"tag":83,"props":1758,"children":1759},{},[1760],{"type":61,"value":1761},"MUST issue each ALTER TABLE in its own transaction",{"type":55,"tag":64,"props":1763,"children":1764},{},[1765,1770,1772,1778],{"type":55,"tag":73,"props":1766,"children":1767},{},[1768],{"type":61,"value":1769},"Recovery — batch fails midway:",{"type":61,"value":1771}," Rows already updated keep their new value (each batch committed independently). Resume by filtering on the unset state (",{"type":55,"tag":362,"props":1773,"children":1775},{"className":1774},[],[1776],{"type":61,"value":1777},"WHERE new_column IS NULL",{"type":61,"value":1779},") and continue. Re-running is safe because the filter naturally excludes completed rows.",{"type":55,"tag":125,"props":1781,"children":1783},{"id":1782},"workflow-3-application-layer-referential-integrity",[1784],{"type":61,"value":1785},"Workflow 3: Application-Layer Referential Integrity",{"type":55,"tag":64,"props":1787,"children":1788},{},[1789,1794],{"type":55,"tag":73,"props":1790,"children":1791},{},[1792],{"type":61,"value":1793},"INSERT:",{"type":61,"value":1795}," MUST validate parent exists with readonly_query → throw error if not found → insert child with transact.",{"type":55,"tag":64,"props":1797,"children":1798},{},[1799,1804],{"type":55,"tag":73,"props":1800,"children":1801},{},[1802],{"type":61,"value":1803},"DELETE:",{"type":61,"value":1805}," MUST check dependents with readonly_query COUNT → return error if dependents exist → delete with transact if safe.",{"type":55,"tag":125,"props":1807,"children":1809},{"id":1808},"workflow-4-query-with-tenant-isolation",[1810],{"type":61,"value":1811},"Workflow 4: Query with Tenant Isolation",{"type":55,"tag":198,"props":1813,"children":1814},{},[1815,1824,1888],{"type":55,"tag":83,"props":1816,"children":1817},{},[1818,1822],{"type":55,"tag":73,"props":1819,"children":1820},{},[1821],{"type":61,"value":1470},{"type":61,"value":1823}," authorize the caller against the tenant — format validation does not establish authorization",{"type":55,"tag":83,"props":1825,"children":1826},{},[1827,1831,1832,1841,1843,1849,1851,1857,1859,1865,1867,1873,1875,1881,1883],{"type":55,"tag":73,"props":1828,"children":1829},{},[1830],{"type":61,"value":1470},{"type":61,"value":1486},{"type":55,"tag":130,"props":1833,"children":1835},{"href":1834},"mcp\u002Ftools\u002Fsafe_query.py",[1836],{"type":55,"tag":362,"props":1837,"children":1839},{"className":1838},[],[1840],{"type":61,"value":1492},{"type":61,"value":1842}," — use ",{"type":55,"tag":362,"props":1844,"children":1846},{"className":1845},[],[1847],{"type":61,"value":1848},"allow()",{"type":61,"value":1850},"\u002F",{"type":55,"tag":362,"props":1852,"children":1854},{"className":1853},[],[1855],{"type":61,"value":1856},"regex()",{"type":61,"value":1858}," for\nvalues (emits ",{"type":55,"tag":362,"props":1860,"children":1862},{"className":1861},[],[1863],{"type":61,"value":1864},"'v'",{"type":61,"value":1866},"), ",{"type":55,"tag":362,"props":1868,"children":1870},{"className":1869},[],[1871],{"type":61,"value":1872},"ident()",{"type":61,"value":1874}," for table\u002Fcolumn names (emits ",{"type":55,"tag":362,"props":1876,"children":1878},{"className":1877},[],[1879],{"type":61,"value":1880},"\"v\"",{"type":61,"value":1882},").\nSee ",{"type":55,"tag":130,"props":1884,"children":1885},{"href":238},[1886],{"type":61,"value":1887},"input-validation.md",{"type":55,"tag":83,"props":1889,"children":1890},{},[1891,1895,1896,1901],{"type":55,"tag":73,"props":1892,"children":1893},{},[1894],{"type":61,"value":1470},{"type":61,"value":1472},{"type":55,"tag":362,"props":1897,"children":1899},{"className":1898},[],[1900],{"type":61,"value":1478},{"type":61,"value":1902}," in the WHERE clause; reject cross-tenant access at the application layer",{"type":55,"tag":125,"props":1904,"children":1906},{"id":1905},"workflow-5-set-up-scoped-database-roles",[1907],{"type":61,"value":1908},"Workflow 5: Set Up Scoped Database Roles",{"type":55,"tag":64,"props":1910,"children":1911},{},[1912,1914,1918],{"type":61,"value":1913},"MUST load ",{"type":55,"tag":130,"props":1915,"children":1916},{"href":348},[1917],{"type":61,"value":351},{"type":61,"value":1919}," for role setup, IAM mapping, and schema permissions.",{"type":55,"tag":125,"props":1921,"children":1923},{"id":1922},"workflow-6-table-recreation-ddl-migration",[1924],{"type":61,"value":1925},"Workflow 6: Table Recreation DDL Migration",{"type":55,"tag":64,"props":1927,"children":1928},{},[1929,1931,1937,1938,1944,1945,1951,1953,1959,1961,1966,1968,1973],{"type":61,"value":1930},"DSQL does NOT support direct ",{"type":55,"tag":362,"props":1932,"children":1934},{"className":1933},[],[1935],{"type":61,"value":1936},"ALTER COLUMN TYPE",{"type":61,"value":831},{"type":55,"tag":362,"props":1939,"children":1941},{"className":1940},[],[1942],{"type":61,"value":1943},"DROP COLUMN",{"type":61,"value":831},{"type":55,"tag":362,"props":1946,"children":1948},{"className":1947},[],[1949],{"type":61,"value":1950},"DROP CONSTRAINT",{"type":61,"value":1952},", or ",{"type":55,"tag":362,"props":1954,"children":1956},{"className":1955},[],[1957],{"type":61,"value":1958},"MODIFY PRIMARY KEY",{"type":61,"value":1960},". These require the ",{"type":55,"tag":73,"props":1962,"children":1963},{},[1964],{"type":61,"value":1965},"Table Recreation Pattern",{"type":61,"value":1967},". This is a destructive workflow that requires user confirmation at each step. Every generated DDL in the pattern (CREATE new, INSERT ... SELECT, DROP old, RENAME) MUST be validated with ",{"type":55,"tag":362,"props":1969,"children":1971},{"className":1970},[],[1972],{"type":61,"value":1687},{"type":61,"value":1974}," before execution.",{"type":55,"tag":64,"props":1976,"children":1977},{},[1978,1979,1983],{"type":61,"value":1913},{"type":55,"tag":130,"props":1980,"children":1981},{"href":413},[1982],{"type":61,"value":416},{"type":61,"value":1984}," before attempting any of these operations.",{"type":55,"tag":125,"props":1986,"children":1988},{"id":1987},"workflow-7-validate-and-migrate-to-dsql",[1989],{"type":61,"value":1990},"Workflow 7: Validate and Migrate to DSQL",{"type":55,"tag":64,"props":1992,"children":1993},{},[1994,1995,1999,2001,2006,2008,2014,2016,2022,2023,2028,2029,2035],{"type":61,"value":1913},{"type":55,"tag":130,"props":1996,"children":1997},{"href":870},[1998],{"type":61,"value":873},{"type":61,"value":2000}," before running ",{"type":55,"tag":362,"props":2002,"children":2004},{"className":2003},[],[2005],{"type":61,"value":624},{"type":61,"value":2007}," — it defines diagnostic handling, the three ",{"type":55,"tag":362,"props":2009,"children":2011},{"className":2010},[],[2012],{"type":61,"value":2013},"fix_result.status",{"type":61,"value":2015}," values (",{"type":55,"tag":362,"props":2017,"children":2019},{"className":2018},[],[2020],{"type":61,"value":2021},"fixed",{"type":61,"value":831},{"type":55,"tag":362,"props":2024,"children":2026},{"className":2025},[],[2027],{"type":61,"value":895},{"type":61,"value":831},{"type":55,"tag":362,"props":2030,"children":2032},{"className":2031},[],[2033],{"type":61,"value":2034},"unfixable",{"type":61,"value":2036},"), and user-confirmation gates.",{"type":55,"tag":64,"props":2038,"children":2039},{},[2040,2042,2048,2050,2055,2057,2063,2064,2070,2072,2078],{"type":61,"value":2041},"Run ",{"type":55,"tag":362,"props":2043,"children":2045},{"className":2044},[],[2046],{"type":61,"value":2047},"dsql_lint(sql=source_sql, fix=true)",{"type":61,"value":2049}," to validate and auto-convert PostgreSQL-compatible SQL. ",{"type":55,"tag":362,"props":2051,"children":2053},{"className":2052},[],[2054],{"type":61,"value":624},{"type":61,"value":2056}," uses a PostgreSQL parser, so MySQL dialect syntax that PostgreSQL cannot parse (e.g., ",{"type":55,"tag":362,"props":2058,"children":2060},{"className":2059},[],[2061],{"type":61,"value":2062},"PARTITION BY HASH",{"type":61,"value":831},{"type":55,"tag":362,"props":2065,"children":2067},{"className":2066},[],[2068],{"type":61,"value":2069},"AUTO_INCREMENT",{"type":61,"value":2071}," in some positions) surfaces as a ",{"type":55,"tag":362,"props":2073,"children":2075},{"className":2074},[],[2076],{"type":61,"value":2077},"parse_error",{"type":61,"value":2079}," rule rather than individual diagnostics.",{"type":55,"tag":79,"props":2081,"children":2082},{},[2083,2110],{"type":55,"tag":83,"props":2084,"children":2085},{},[2086,2088,2092,2094,2100,2102,2108],{"type":61,"value":2087},"For MySQL-origin SQL, MUST cross-check the source against ",{"type":55,"tag":130,"props":2089,"children":2090},{"href":519},[2091],{"type":61,"value":522},{"type":61,"value":2093}," even when lint returns clean — ",{"type":55,"tag":362,"props":2095,"children":2097},{"className":2096},[],[2098],{"type":61,"value":2099},"ENGINE=",{"type":61,"value":2101}," clauses and ",{"type":55,"tag":362,"props":2103,"children":2105},{"className":2104},[],[2106],{"type":61,"value":2107},"SET(...)",{"type":61,"value":2109}," column types can pass silently through the PostgreSQL parser.",{"type":55,"tag":83,"props":2111,"children":2112},{},[2113,2115,2120,2122,2126,2128,2133],{"type":61,"value":2114},"On ",{"type":55,"tag":362,"props":2116,"children":2118},{"className":2117},[],[2119],{"type":61,"value":2077},{"type":61,"value":2121},", fall back to ",{"type":55,"tag":130,"props":2123,"children":2124},{"href":519},[2125],{"type":61,"value":522},{"type":61,"value":2127}," for manual conversion, then re-run ",{"type":55,"tag":362,"props":2129,"children":2131},{"className":2130},[],[2132],{"type":61,"value":624},{"type":61,"value":2134}," on the converted output before executing.",{"type":55,"tag":125,"props":2136,"children":2138},{"id":2137},"workflow-8-query-plan-explainability",[2139],{"type":61,"value":2140},"Workflow 8: Query Plan Explainability",{"type":55,"tag":64,"props":2142,"children":2143},{},[2144,2146,2151,2153,2158,2160,2166],{"type":61,"value":2145},"Explains why the DSQL optimizer chose a particular plan. Triggered by slow queries, high DPU, unexpected Full Scans, or plans the user doesn't understand. ",{"type":55,"tag":73,"props":2147,"children":2148},{},[2149],{"type":61,"value":2150},"REQUIRES a structured Markdown diagnostic report is the deliverable",{"type":61,"value":2152}," beyond conversation — run the workflow end-to-end before answering. Use the ",{"type":55,"tag":362,"props":2154,"children":2156},{"className":2155},[],[2157],{"type":61,"value":929},{"type":61,"value":2159}," MCP when connected; fall back to raw ",{"type":55,"tag":362,"props":2161,"children":2163},{"className":2162},[],[2164],{"type":61,"value":2165},"psql",{"type":61,"value":2167}," with a generated IAM token (see the fallback block below) otherwise.",{"type":55,"tag":64,"props":2169,"children":2170},{},[2171,2176,2178,2184],{"type":55,"tag":73,"props":2172,"children":2173},{},[2174],{"type":61,"value":2175},"Phase 0 — Load reference material.",{"type":61,"value":2177}," Read all four before starting — each has content later phases need verbatim (node-type math, exact catalog SQL, the ",{"type":55,"tag":362,"props":2179,"children":2181},{"className":2180},[],[2182],{"type":61,"value":2183},">30s",{"type":61,"value":2185}," skip protocol, required report elements):",{"type":55,"tag":198,"props":2187,"children":2188},{},[2189,2198,2207,2223],{"type":55,"tag":83,"props":2190,"children":2191},{},[2192,2196],{"type":55,"tag":130,"props":2193,"children":2194},{"href":826},[2195],{"type":61,"value":829},{"type":61,"value":2197}," — node types, duration math, anomalous values",{"type":55,"tag":83,"props":2199,"children":2200},{},[2201,2205],{"type":55,"tag":130,"props":2202,"children":2203},{"href":834},[2204],{"type":61,"value":837},{"type":61,"value":2206}," — pg_class \u002F pg_stats \u002F pg_indexes SQL",{"type":55,"tag":83,"props":2208,"children":2209},{},[2210,2214,2216,2221],{"type":55,"tag":130,"props":2211,"children":2212},{"href":841},[2213],{"type":61,"value":844},{"type":61,"value":2215}," — GUC procedures and ",{"type":55,"tag":362,"props":2217,"children":2219},{"className":2218},[],[2220],{"type":61,"value":2183},{"type":61,"value":2222}," skip protocol",{"type":55,"tag":83,"props":2224,"children":2225},{},[2226,2230],{"type":55,"tag":130,"props":2227,"children":2228},{"href":848},[2229],{"type":61,"value":851},{"type":61,"value":2231}," — required report structure",{"type":55,"tag":64,"props":2233,"children":2234},{},[2235,2240,2241,2246,2248,2254,2256,2260,2262,2267,2269,2274,2276,2281,2283,2289,2290,2296,2297,2301,2303,2308,2310,2315,2317,2322,2324,2329,2331,2335,2337,2341,2342,2348],{"type":55,"tag":73,"props":2236,"children":2237},{},[2238],{"type":61,"value":2239},"Phase 1 — Capture the plan.",{"type":61,"value":152},{"type":55,"tag":73,"props":2242,"children":2243},{},[2244],{"type":61,"value":2245},"ALWAYS",{"type":61,"value":2247}," run ",{"type":55,"tag":362,"props":2249,"children":2251},{"className":2250},[],[2252],{"type":61,"value":2253},"readonly_query(\"EXPLAIN ANALYZE VERBOSE …\")",{"type":61,"value":2255}," on the user's query verbatim (SELECT form) — ",{"type":55,"tag":73,"props":2257,"children":2258},{},[2259],{"type":61,"value":2245},{"type":61,"value":2261}," capture a fresh plan from the cluster, even when the user describes the plan or reports an anomaly. ",{"type":55,"tag":73,"props":2263,"children":2264},{},[2265],{"type":61,"value":2266},"MAY",{"type":61,"value":2268}," leverage ",{"type":55,"tag":362,"props":2270,"children":2272},{"className":2271},[],[2273],{"type":61,"value":970},{"type":61,"value":2275}," or ",{"type":55,"tag":362,"props":2277,"children":2279},{"className":2278},[],[2280],{"type":61,"value":1440},{"type":61,"value":2282}," for schema sanity checks. When EXPLAIN errors (",{"type":55,"tag":362,"props":2284,"children":2286},{"className":2285},[],[2287],{"type":61,"value":2288},"relation does not exist",{"type":61,"value":831},{"type":55,"tag":362,"props":2291,"children":2293},{"className":2292},[],[2294],{"type":61,"value":2295},"column does not exist",{"type":61,"value":1866},{"type":55,"tag":73,"props":2298,"children":2299},{},[2300],{"type":61,"value":1470},{"type":61,"value":2302}," report the error verbatim — ",{"type":55,"tag":73,"props":2304,"children":2305},{},[2306],{"type":61,"value":2307},"MUST NOT",{"type":61,"value":2309}," invent DSQL-specific semantics (e.g., case sensitivity, identifier quoting) as the root cause. Extract Query ID, Planning Time, Execution Time, DPU Estimate. ",{"type":55,"tag":73,"props":2311,"children":2312},{},[2313],{"type":61,"value":2314},"SELECT",{"type":61,"value":2316}," runs as-is. ",{"type":55,"tag":73,"props":2318,"children":2319},{},[2320],{"type":61,"value":2321},"UPDATE\u002FDELETE",{"type":61,"value":2323}," rewrite to the equivalent SELECT (same join chain + WHERE) — the optimizer picks the same plan shape. ",{"type":55,"tag":73,"props":2325,"children":2326},{},[2327],{"type":61,"value":2328},"INSERT",{"type":61,"value":2330},", pl\u002Fpgsql, DO blocks, and functions ",{"type":55,"tag":73,"props":2332,"children":2333},{},[2334],{"type":61,"value":1470},{"type":61,"value":2336}," be rejected. ",{"type":55,"tag":73,"props":2338,"children":2339},{},[2340],{"type":61,"value":2307},{"type":61,"value":1521},{"type":55,"tag":362,"props":2343,"children":2345},{"className":2344},[],[2346],{"type":61,"value":2347},"transact --allow-writes",{"type":61,"value":2349}," for plan capture; it bypasses MCP safety.",{"type":55,"tag":64,"props":2351,"children":2352},{},[2353,2358,2360,2366,2368,2374,2375,2381,2382,2388,2389,2395,2396,2402,2404,2410],{"type":55,"tag":73,"props":2354,"children":2355},{},[2356],{"type":61,"value":2357},"Phase 2 — Gather evidence.",{"type":61,"value":2359}," Using SQL from ",{"type":55,"tag":362,"props":2361,"children":2363},{"className":2362},[],[2364],{"type":61,"value":2365},"catalog-queries.md",{"type":61,"value":2367},", query ",{"type":55,"tag":362,"props":2369,"children":2371},{"className":2370},[],[2372],{"type":61,"value":2373},"pg_class",{"type":61,"value":831},{"type":55,"tag":362,"props":2376,"children":2378},{"className":2377},[],[2379],{"type":61,"value":2380},"pg_stats",{"type":61,"value":831},{"type":55,"tag":362,"props":2383,"children":2385},{"className":2384},[],[2386],{"type":61,"value":2387},"pg_indexes",{"type":61,"value":831},{"type":55,"tag":362,"props":2390,"children":2392},{"className":2391},[],[2393],{"type":61,"value":2394},"COUNT(*)",{"type":61,"value":831},{"type":55,"tag":362,"props":2397,"children":2399},{"className":2398},[],[2400],{"type":61,"value":2401},"COUNT(DISTINCT)",{"type":61,"value":2403},". Classify estimation errors per ",{"type":55,"tag":362,"props":2405,"children":2407},{"className":2406},[],[2408],{"type":61,"value":2409},"plan-interpretation.md",{"type":61,"value":2411}," (2x–5x minor, 5x–50x significant, 50x+ severe). Detect correlated predicates and data skew.",{"type":55,"tag":64,"props":2413,"children":2414},{},[2415,2420,2422,2428,2430,2436],{"type":55,"tag":73,"props":2416,"children":2417},{},[2418],{"type":61,"value":2419},"Phase 3 — Experiment (conditional).",{"type":61,"value":2421}," ≤30s: run GUC experiments per ",{"type":55,"tag":362,"props":2423,"children":2425},{"className":2424},[],[2426],{"type":61,"value":2427},"guc-experiments.md",{"type":61,"value":2429}," (default + merge-join-only) plus optional redundant-predicate test. >30s: skip experiments, include the manual GUC testing SQL verbatim in the report, and do not re-run for redundant-predicate testing. Anomalous values (impossible row counts): confirm query results are correct despite the anomalous EXPLAIN, flag as a potential DSQL bug, and produce the Support Request Template from ",{"type":55,"tag":362,"props":2431,"children":2433},{"className":2432},[],[2434],{"type":61,"value":2435},"report-format.md",{"type":61,"value":1380},{"type":55,"tag":64,"props":2438,"children":2439},{},[2440,2445,2447,2451,2453,2458],{"type":55,"tag":73,"props":2441,"children":2442},{},[2443],{"type":61,"value":2444},"Phase 4 — Produce the report, invite reassessment.",{"type":61,"value":2446}," Produce the full diagnostic report per the \"Required Elements Checklist\" in ",{"type":55,"tag":130,"props":2448,"children":2449},{"href":848},[2450],{"type":61,"value":851},{"type":61,"value":2452}," — structure is non-negotiable. End with the \"Next Steps\" block from that reference so the user can ask for a reassessment after applying a recommendation. When the user says \"reassess\" (or equivalent), re-run Phase 1–2 and ",{"type":55,"tag":73,"props":2454,"children":2455},{},[2456],{"type":61,"value":2457},"append an \"Addendum: After-Change Performance\"",{"type":61,"value":2459}," to the original report (before\u002Fafter table, match against expected impact) rather than producing a new report.",{"type":55,"tag":64,"props":2461,"children":2462},{},[2463,2468,2470,2475,2477,2483],{"type":55,"tag":73,"props":2464,"children":2465},{},[2466],{"type":61,"value":2467},"psql fallback (MCP unavailable).",{"type":61,"value":2469}," Pipe statements into ",{"type":55,"tag":362,"props":2471,"children":2473},{"className":2472},[],[2474],{"type":61,"value":2165},{"type":61,"value":2476}," via heredoc and check ",{"type":55,"tag":362,"props":2478,"children":2480},{"className":2479},[],[2481],{"type":61,"value":2482},"$?",{"type":61,"value":2484},"; report failures without proceeding on partial evidence:",{"type":55,"tag":2486,"props":2487,"children":2492},"pre",{"className":2488,"code":2489,"language":2490,"meta":2491,"style":2491},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","TOKEN=$(aws dsql generate-db-connect-admin-auth-token --hostname \"$HOST\" --region \"$REGION\")\nPGPASSWORD=\"$TOKEN\" psql \"host=$HOST port=5432 user=admin dbname=postgres sslmode=require\" \u003C\u003C\u003C\"EXPLAIN ANALYZE VERBOSE \u003Csql>;\"\n","bash","",[2493],{"type":55,"tag":362,"props":2494,"children":2495},{"__ignoreMap":2491},[2496,2573],{"type":55,"tag":2497,"props":2498,"children":2501},"span",{"class":2499,"line":2500},"line",1,[2502,2508,2514,2519,2525,2530,2535,2540,2545,2550,2555,2559,2564,2568],{"type":55,"tag":2497,"props":2503,"children":2505},{"style":2504},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[2506],{"type":61,"value":2507},"TOKEN",{"type":55,"tag":2497,"props":2509,"children":2511},{"style":2510},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[2512],{"type":61,"value":2513},"=$(",{"type":55,"tag":2497,"props":2515,"children":2517},{"style":2516},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[2518],{"type":61,"value":29},{"type":55,"tag":2497,"props":2520,"children":2522},{"style":2521},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[2523],{"type":61,"value":2524}," dsql",{"type":55,"tag":2497,"props":2526,"children":2527},{"style":2521},[2528],{"type":61,"value":2529}," generate-db-connect-admin-auth-token",{"type":55,"tag":2497,"props":2531,"children":2532},{"style":2521},[2533],{"type":61,"value":2534}," --hostname",{"type":55,"tag":2497,"props":2536,"children":2537},{"style":2510},[2538],{"type":61,"value":2539}," \"",{"type":55,"tag":2497,"props":2541,"children":2542},{"style":2504},[2543],{"type":61,"value":2544},"$HOST",{"type":55,"tag":2497,"props":2546,"children":2547},{"style":2510},[2548],{"type":61,"value":2549},"\"",{"type":55,"tag":2497,"props":2551,"children":2552},{"style":2521},[2553],{"type":61,"value":2554}," --region",{"type":55,"tag":2497,"props":2556,"children":2557},{"style":2510},[2558],{"type":61,"value":2539},{"type":55,"tag":2497,"props":2560,"children":2561},{"style":2504},[2562],{"type":61,"value":2563},"$REGION",{"type":55,"tag":2497,"props":2565,"children":2566},{"style":2510},[2567],{"type":61,"value":2549},{"type":55,"tag":2497,"props":2569,"children":2570},{"style":2510},[2571],{"type":61,"value":2572},")\n",{"type":55,"tag":2497,"props":2574,"children":2576},{"class":2499,"line":2575},2,[2577,2582,2587,2591,2596,2600,2605,2609,2614,2618,2623,2627,2632,2636,2641],{"type":55,"tag":2497,"props":2578,"children":2579},{"style":2504},[2580],{"type":61,"value":2581},"PGPASSWORD",{"type":55,"tag":2497,"props":2583,"children":2584},{"style":2510},[2585],{"type":61,"value":2586},"=",{"type":55,"tag":2497,"props":2588,"children":2589},{"style":2510},[2590],{"type":61,"value":2549},{"type":55,"tag":2497,"props":2592,"children":2593},{"style":2504},[2594],{"type":61,"value":2595},"$TOKEN",{"type":55,"tag":2497,"props":2597,"children":2598},{"style":2510},[2599],{"type":61,"value":2549},{"type":55,"tag":2497,"props":2601,"children":2602},{"style":2516},[2603],{"type":61,"value":2604}," psql",{"type":55,"tag":2497,"props":2606,"children":2607},{"style":2510},[2608],{"type":61,"value":2539},{"type":55,"tag":2497,"props":2610,"children":2611},{"style":2521},[2612],{"type":61,"value":2613},"host=",{"type":55,"tag":2497,"props":2615,"children":2616},{"style":2504},[2617],{"type":61,"value":2544},{"type":55,"tag":2497,"props":2619,"children":2620},{"style":2521},[2621],{"type":61,"value":2622}," port=5432 user=admin dbname=postgres sslmode=require",{"type":55,"tag":2497,"props":2624,"children":2625},{"style":2510},[2626],{"type":61,"value":2549},{"type":55,"tag":2497,"props":2628,"children":2629},{"style":2510},[2630],{"type":61,"value":2631}," \u003C\u003C\u003C",{"type":55,"tag":2497,"props":2633,"children":2634},{"style":2510},[2635],{"type":61,"value":2549},{"type":55,"tag":2497,"props":2637,"children":2638},{"style":2521},[2639],{"type":61,"value":2640},"EXPLAIN ANALYZE VERBOSE \u003Csql>;",{"type":55,"tag":2497,"props":2642,"children":2643},{"style":2510},[2644],{"type":61,"value":2645},"\"\n",{"type":55,"tag":64,"props":2647,"children":2648},{},[2649,2654,2656,2661,2663,2668,2670,2675,2677,2681],{"type":55,"tag":73,"props":2650,"children":2651},{},[2652],{"type":61,"value":2653},"Safety.",{"type":61,"value":2655}," Plan capture uses ",{"type":55,"tag":362,"props":2657,"children":2659},{"className":2658},[],[2660],{"type":61,"value":950},{"type":61,"value":2662}," exclusively — it rejects INSERT\u002FUPDATE\u002FDELETE\u002FDDL at the MCP layer. Rewrite DML to SELECT (Phase 1) rather than asking ",{"type":55,"tag":362,"props":2664,"children":2666},{"className":2665},[],[2667],{"type":61,"value":2347},{"type":61,"value":2669}," to run it; write-mode ",{"type":55,"tag":362,"props":2671,"children":2673},{"className":2672},[],[2674],{"type":61,"value":960},{"type":61,"value":2676}," bypasses all MCP safety checks. ",{"type":55,"tag":73,"props":2678,"children":2679},{},[2680],{"type":61,"value":2307},{"type":61,"value":2682}," run arbitrary DDL\u002FDML or pl\u002Fpgsql.",{"type":55,"tag":109,"props":2684,"children":2685},{},[],{"type":55,"tag":113,"props":2687,"children":2689},{"id":2688},"error-scenarios",[2690],{"type":61,"value":2691},"Error Scenarios",{"type":55,"tag":79,"props":2693,"children":2694},{},[2695,2716,2742,2757,2773],{"type":55,"tag":83,"props":2696,"children":2697},{},[2698,2708,2710,2715],{"type":55,"tag":73,"props":2699,"children":2700},{},[2701,2706],{"type":55,"tag":362,"props":2702,"children":2704},{"className":2703},[],[2705],{"type":61,"value":1087},{"type":61,"value":2707}," returns no results:",{"type":61,"value":2709}," Use the default limits in the table above and note that limits should be verified against ",{"type":55,"tag":130,"props":2711,"children":2713},{"href":1373,"rel":2712},[1375],[2714],{"type":61,"value":1378},{"type":61,"value":1380},{"type":55,"tag":83,"props":2717,"children":2718},{},[2719,2729,2731,2735,2737,2741],{"type":55,"tag":73,"props":2720,"children":2721},{},[2722,2727],{"type":55,"tag":362,"props":2723,"children":2725},{"className":2724},[],[2726],{"type":61,"value":624},{"type":61,"value":2728}," unavailable or timing out:",{"type":61,"value":2730}," See the Error Handling section of ",{"type":55,"tag":130,"props":2732,"children":2733},{"href":870},[2734],{"type":61,"value":873},{"type":61,"value":2736},". Do not silently skip validation — inform the user and require explicit confirmation before proceeding with manual rules from ",{"type":55,"tag":130,"props":2738,"children":2739},{"href":132},[2740],{"type":61,"value":135},{"type":61,"value":1380},{"type":55,"tag":83,"props":2743,"children":2744},{},[2745,2750,2752,2756],{"type":55,"tag":73,"props":2746,"children":2747},{},[2748],{"type":61,"value":2749},"OCC serialization error:",{"type":61,"value":2751}," Retry the transaction. If persistent, check for hot-key contention — see ",{"type":55,"tag":130,"props":2753,"children":2754},{"href":298},[2755],{"type":61,"value":301},{"type":61,"value":1380},{"type":55,"tag":83,"props":2758,"children":2759},{},[2760,2765,2767,2772],{"type":55,"tag":73,"props":2761,"children":2762},{},[2763],{"type":61,"value":2764},"Transaction exceeds limits:",{"type":61,"value":2766}," Split into batches under 3,000 rows — see ",{"type":55,"tag":130,"props":2768,"children":2769},{"href":488},[2770],{"type":61,"value":2771},"batched-migration.md",{"type":61,"value":1380},{"type":55,"tag":83,"props":2774,"children":2775},{},[2776,2781,2783,2789,2791,2795],{"type":55,"tag":73,"props":2777,"children":2778},{},[2779],{"type":61,"value":2780},"Token expiration mid-operation:",{"type":61,"value":2782}," Generate a fresh IAM token — see ",{"type":55,"tag":130,"props":2784,"children":2786},{"href":2785},"references\u002Fauth\u002Fauthentication-guide.md",[2787],{"type":61,"value":2788},"authentication-guide.md",{"type":61,"value":2790},". See ",{"type":55,"tag":130,"props":2792,"children":2793},{"href":298},[2794],{"type":61,"value":301},{"type":61,"value":2796}," for other issues.",{"type":55,"tag":109,"props":2798,"children":2799},{},[],{"type":55,"tag":113,"props":2801,"children":2803},{"id":2802},"additional-resources",[2804],{"type":61,"value":2805},"Additional Resources",{"type":55,"tag":79,"props":2807,"children":2808},{},[2809,2818,2828,2838],{"type":55,"tag":83,"props":2810,"children":2811},{},[2812],{"type":55,"tag":130,"props":2813,"children":2815},{"href":1373,"rel":2814},[1375],[2816],{"type":61,"value":2817},"Aurora DSQL Documentation",{"type":55,"tag":83,"props":2819,"children":2820},{},[2821],{"type":55,"tag":130,"props":2822,"children":2825},{"href":2823,"rel":2824},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Faurora-dsql-samples",[1375],[2826],{"type":61,"value":2827},"Code Samples Repository",{"type":55,"tag":83,"props":2829,"children":2830},{},[2831],{"type":55,"tag":130,"props":2832,"children":2835},{"href":2833,"rel":2834},"https:\u002F\u002Fdocs.aws.amazon.com\u002Faurora-dsql\u002Flatest\u002Fuserguide\u002Fworking-with-postgresql-compatibility.html",[1375],[2836],{"type":61,"value":2837},"PostgreSQL Compatibility",{"type":55,"tag":83,"props":2839,"children":2840},{},[2841],{"type":55,"tag":130,"props":2842,"children":2845},{"href":2843,"rel":2844},"https:\u002F\u002Fdocs.aws.amazon.com\u002FAWSCloudFormation\u002Flatest\u002FUserGuide\u002Faws-resource-dsql-cluster.html",[1375],[2846],{"type":61,"value":2847},"CloudFormation Resource",{"type":55,"tag":2849,"props":2850,"children":2851},"style",{},[2852],{"type":61,"value":2853},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":2855,"total":2936},[2856,2873,2886,2895,2908,2916,2926],{"slug":2857,"name":2857,"fn":2858,"description":2859,"org":2860,"tags":2861,"stars":30,"repoUrl":31,"updatedAt":2872},"agentcore-investigation","investigate Bedrock AgentCore runtime sessions","Investigate Bedrock AgentCore runtime sessions via CloudWatch Logs Insights — resolve session\u002Ftrace IDs, query OTEL spans, filter noise, build timelines. Use when debugging AgentCore agent sessions, tracing tool calls, or analyzing latency.",{"slug":9,"name":10,"logoUrl":11,"githubOrg":12},[2862,2863,2866,2869],{"name":28,"slug":29,"type":17},{"name":2864,"slug":2865,"type":17},"Debugging","debugging",{"name":2867,"slug":2868,"type":17},"Logs","logs",{"name":2870,"slug":2871,"type":17},"Observability","observability","2026-07-12T08:37:22.601527",{"slug":2874,"name":2875,"fn":6,"description":7,"org":2876,"tags":2877,"stars":30,"repoUrl":31,"updatedAt":2885},"amazon-aurora-dsql","amazon aurora dsql",{"slug":9,"name":10,"logoUrl":11,"githubOrg":12},[2878,2881,2882,2883,2884],{"name":2879,"slug":2880,"type":17},"Aurora","aurora",{"name":28,"slug":29,"type":17},{"name":15,"slug":16,"type":17},{"name":25,"slug":26,"type":17},{"name":22,"slug":23,"type":17},"2026-07-12T08:36:45.053393",{"slug":929,"name":2887,"fn":6,"description":7,"org":2888,"tags":2889,"stars":30,"repoUrl":31,"updatedAt":2894},"aurora dsql",{"slug":9,"name":10,"logoUrl":11,"githubOrg":12},[2890,2891,2892,2893],{"name":28,"slug":29,"type":17},{"name":15,"slug":16,"type":17},{"name":25,"slug":26,"type":17},{"name":22,"slug":23,"type":17},"2026-07-12T08:36:42.694299",{"slug":2896,"name":2897,"fn":6,"description":7,"org":2898,"tags":2899,"stars":30,"repoUrl":31,"updatedAt":2907},"aws-dsql","aws dsql",{"slug":9,"name":10,"logoUrl":11,"githubOrg":12},[2900,2901,2902,2905,2906],{"name":28,"slug":29,"type":17},{"name":15,"slug":16,"type":17},{"name":2903,"slug":2904,"type":17},"Migration","migration",{"name":25,"slug":26,"type":17},{"name":22,"slug":23,"type":17},"2026-07-12T08:36:38.584057",{"slug":4,"name":5,"fn":6,"description":7,"org":2909,"tags":2910,"stars":30,"repoUrl":31,"updatedAt":32},{"slug":9,"name":10,"logoUrl":11,"githubOrg":12},[2911,2912,2913,2914,2915],{"name":28,"slug":29,"type":17},{"name":15,"slug":16,"type":17},{"name":19,"slug":20,"type":17},{"name":25,"slug":26,"type":17},{"name":22,"slug":23,"type":17},{"slug":2917,"name":2918,"fn":6,"description":7,"org":2919,"tags":2920,"stars":30,"repoUrl":31,"updatedAt":2925},"distributed-sql","distributed sql",{"slug":9,"name":10,"logoUrl":11,"githubOrg":12},[2921,2922,2923,2924],{"name":28,"slug":29,"type":17},{"name":15,"slug":16,"type":17},{"name":25,"slug":26,"type":17},{"name":22,"slug":23,"type":17},"2026-07-12T08:36:48.104182",{"slug":2927,"name":2927,"fn":6,"description":7,"org":2928,"tags":2929,"stars":30,"repoUrl":31,"updatedAt":2935},"dsql",{"slug":9,"name":10,"logoUrl":11,"githubOrg":12},[2930,2931,2932,2933,2934],{"name":28,"slug":29,"type":17},{"name":15,"slug":16,"type":17},{"name":2903,"slug":2904,"type":17},{"name":25,"slug":26,"type":17},{"name":22,"slug":23,"type":17},"2026-07-12T08:36:36.374512",7,{"items":2938,"total":3073},[2939,2946,2954,2961,2969,2977,2984,2992,3013,3028,3043,3058],{"slug":2857,"name":2857,"fn":2858,"description":2859,"org":2940,"tags":2941,"stars":30,"repoUrl":31,"updatedAt":2872},{"slug":9,"name":10,"logoUrl":11,"githubOrg":12},[2942,2943,2944,2945],{"name":28,"slug":29,"type":17},{"name":2864,"slug":2865,"type":17},{"name":2867,"slug":2868,"type":17},{"name":2870,"slug":2871,"type":17},{"slug":2874,"name":2875,"fn":6,"description":7,"org":2947,"tags":2948,"stars":30,"repoUrl":31,"updatedAt":2885},{"slug":9,"name":10,"logoUrl":11,"githubOrg":12},[2949,2950,2951,2952,2953],{"name":2879,"slug":2880,"type":17},{"name":28,"slug":29,"type":17},{"name":15,"slug":16,"type":17},{"name":25,"slug":26,"type":17},{"name":22,"slug":23,"type":17},{"slug":929,"name":2887,"fn":6,"description":7,"org":2955,"tags":2956,"stars":30,"repoUrl":31,"updatedAt":2894},{"slug":9,"name":10,"logoUrl":11,"githubOrg":12},[2957,2958,2959,2960],{"name":28,"slug":29,"type":17},{"name":15,"slug":16,"type":17},{"name":25,"slug":26,"type":17},{"name":22,"slug":23,"type":17},{"slug":2896,"name":2897,"fn":6,"description":7,"org":2962,"tags":2963,"stars":30,"repoUrl":31,"updatedAt":2907},{"slug":9,"name":10,"logoUrl":11,"githubOrg":12},[2964,2965,2966,2967,2968],{"name":28,"slug":29,"type":17},{"name":15,"slug":16,"type":17},{"name":2903,"slug":2904,"type":17},{"name":25,"slug":26,"type":17},{"name":22,"slug":23,"type":17},{"slug":4,"name":5,"fn":6,"description":7,"org":2970,"tags":2971,"stars":30,"repoUrl":31,"updatedAt":32},{"slug":9,"name":10,"logoUrl":11,"githubOrg":12},[2972,2973,2974,2975,2976],{"name":28,"slug":29,"type":17},{"name":15,"slug":16,"type":17},{"name":19,"slug":20,"type":17},{"name":25,"slug":26,"type":17},{"name":22,"slug":23,"type":17},{"slug":2917,"name":2918,"fn":6,"description":7,"org":2978,"tags":2979,"stars":30,"repoUrl":31,"updatedAt":2925},{"slug":9,"name":10,"logoUrl":11,"githubOrg":12},[2980,2981,2982,2983],{"name":28,"slug":29,"type":17},{"name":15,"slug":16,"type":17},{"name":25,"slug":26,"type":17},{"name":22,"slug":23,"type":17},{"slug":2927,"name":2927,"fn":6,"description":7,"org":2985,"tags":2986,"stars":30,"repoUrl":31,"updatedAt":2935},{"slug":9,"name":10,"logoUrl":11,"githubOrg":12},[2987,2988,2989,2990,2991],{"name":28,"slug":29,"type":17},{"name":15,"slug":16,"type":17},{"name":2903,"slug":2904,"type":17},{"name":25,"slug":26,"type":17},{"name":22,"slug":23,"type":17},{"slug":2993,"name":2993,"fn":2994,"description":2995,"org":2996,"tags":2997,"stars":3010,"repoUrl":3011,"updatedAt":3012},"cost-efficiency-analyzer","analyze cost efficiency and expenses","Analyzes cost structure, cost efficiency, and expense management from P&L data. Use when the user asks about costs, expenses, COGS, operating expenses, cost ratios, cost control, spending efficiency, margin compression from cost side, or wants to understand where money is going. Also use for \"are we spending too much\", \"cost breakdown\", \"expense analysis\", or \"how efficient are our operations\". NOT for revenue or top-line analysis.",{"slug":9,"name":10,"logoUrl":11,"githubOrg":12},[2998,3001,3004,3007],{"name":2999,"slug":3000,"type":17},"Accounting","accounting",{"name":3002,"slug":3003,"type":17},"Analytics","analytics",{"name":3005,"slug":3006,"type":17},"Cost Optimization","cost-optimization",{"name":3008,"slug":3009,"type":17},"Finance","finance",3176,"https:\u002F\u002Fgithub.com\u002Fawslabs\u002Fagentcore-samples","2026-07-12T08:40:03.29555",{"slug":3014,"name":3014,"fn":3015,"description":3016,"org":3017,"tags":3018,"stars":3010,"repoUrl":3011,"updatedAt":3027},"executive-financial-briefing","generate executive financial briefings","Generates a concise executive-level financial briefing or summary suitable for a CEO, CFO, or board presentation. Use when the user asks for a summary, briefing, executive summary, board update, financial overview, financial health check, or \"how is the business doing\". Covers the full P&L picture in one page. Also use for \"give me the highlights\", \"what do I need to know\", or \"quick financial update\".",{"slug":9,"name":10,"logoUrl":11,"githubOrg":12},[3019,3020,3021,3024],{"name":28,"slug":29,"type":17},{"name":3008,"slug":3009,"type":17},{"name":3022,"slug":3023,"type":17},"Management","management",{"name":3025,"slug":3026,"type":17},"Reporting","reporting","2026-07-12T08:40:02.066471",{"slug":3029,"name":3029,"fn":3030,"description":3031,"org":3032,"tags":3033,"stars":3010,"repoUrl":3011,"updatedAt":3042},"multi-quarter-trend-analysis","analyze multi-quarter financial trends","Analyzes financial trends across multiple quarters by comparing P&L metrics over time. Use when the user wants to see trends, patterns, trajectories, or directional movement across 3 or more quarters. Also use for \"how are we trending\", \"show me the trend\", \"track performance over time\", \"quarter over quarter comparison across all quarters\", or any multi-period longitudinal analysis.",{"slug":9,"name":10,"logoUrl":11,"githubOrg":12},[3034,3035,3036,3039],{"name":3002,"slug":3003,"type":17},{"name":3008,"slug":3009,"type":17},{"name":3037,"slug":3038,"type":17},"Financial Statements","financial-statements",{"name":3040,"slug":3041,"type":17},"Variance Analysis","variance-analysis","2026-07-12T08:40:00.79141",{"slug":3044,"name":3044,"fn":3045,"description":3046,"org":3047,"tags":3048,"stars":3010,"repoUrl":3011,"updatedAt":3057},"pdf","process and manipulate PDF documents","Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text\u002Ftables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting\u002Fdecrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.",{"slug":9,"name":10,"logoUrl":11,"githubOrg":12},[3049,3052,3055],{"name":3050,"slug":3051,"type":17},"Automation","automation",{"name":3053,"slug":3054,"type":17},"Documents","documents",{"name":3056,"slug":3044,"type":17},"PDF","2026-07-12T08:41:44.135656",{"slug":3059,"name":3059,"fn":3060,"description":3061,"org":3062,"tags":3063,"stars":3010,"repoUrl":3011,"updatedAt":3072},"quarterly-kpi-calculator","calculate quarterly financial KPIs","Calculates quarterly financial KPIs from P&L data. P&L figures can be provided directly by the user or fetched from the financial data MCP server. Use when the user wants KPI calculations such as Gross Margin %, EBITDA Margin %, Operating Expense Ratio, or Revenue Growth % QoQ. Also use for quarterly performance review, P&L analysis, or interpreting financial ratios against benchmarks.",{"slug":9,"name":10,"logoUrl":11,"githubOrg":12},[3064,3065,3068,3069],{"name":2999,"slug":3000,"type":17},{"name":3066,"slug":3067,"type":17},"Data Analysis","data-analysis",{"name":3008,"slug":3009,"type":17},{"name":3070,"slug":3071,"type":17},"KPI","kpi","2026-07-12T08:39:59.54971",150]