Aurora DSQL Incompatibility Reference
Generated from @mantleframework/database/src/dsql/registry.ts. This is the single source of truth for every known PostgreSQL-to-Aurora DSQL difference.
Query programmatically:
typescript
import { DSQL_INCOMPATIBILITIES, getByCategory, getByAction, getIncompatibility } from '@mantleframework/database'DDL
| ID | Feature | PG Behavior | DSQL Behavior | Action | Convention |
|---|---|---|---|---|---|
ddl-foreign-key | Foreign Keys | Fully enforced referential integrity | Accepted in syntax but NOT enforced at runtime | app-layer | |
ddl-trigger | Triggers | CREATE TRIGGER fully supported | Not supported | strip | |
ddl-temp-table | Temporary Tables | CREATE TEMP TABLE supported | Not supported | error | |
ddl-sequence | Sequences | CREATE SEQUENCE supported | Not supported; use GENERATED AS IDENTITY with cache >= 65536 or UUIDs | strip | |
ddl-plpgsql-do | PL/pgSQL DO blocks | DO $$ blocks execute procedural code | Not supported; SQL-only functions only | strip | |
ddl-rls | Row Level Security | ENABLE/DISABLE/FORCE ROW LEVEL SECURITY, CREATE POLICY | Not supported; use IAM + GRANT for access control | strip | |
ddl-alter-drop-column | ALTER TABLE DROP COLUMN | Supported | Not supported; requires table recreation | recreate | C73 |
ddl-alter-type | ALTER TABLE ALTER COLUMN TYPE | Supported | Not supported; requires table recreation | recreate | C73 |
ddl-alter-set-default | ALTER TABLE SET DEFAULT | Supported | Not supported; requires table recreation | recreate | C73 |
ddl-alter-drop-default | ALTER TABLE DROP DEFAULT | Supported | Not supported; requires table recreation | recreate | C73 |
ddl-alter-set-not-null | ALTER TABLE SET NOT NULL | Supported | Not supported; requires table recreation | recreate | C73 |
ddl-alter-drop-not-null | ALTER TABLE DROP NOT NULL | Supported | Not supported; requires table recreation | recreate | C73 |
ddl-alter-add-constraint | ALTER TABLE ADD CONSTRAINT | Supported | Not supported; constraints must be in CREATE TABLE | recreate | |
ddl-alter-drop-constraint | ALTER TABLE DROP CONSTRAINT | Supported | Not supported; requires table recreation | recreate | |
ddl-truncate | TRUNCATE TABLE | Supported | Not supported; rewrite to DELETE FROM (batch) or DROP+CREATE | rewrite | |
ddl-check-constraint-alter | CHECK constraint via ALTER TABLE | Supported | Not supported; CHECK constraints must be in CREATE TABLE | recreate | |
ddl-mixed-ddl-dml | DDL + DML in same transaction | Supported | Not supported; DDL and DML cannot be mixed in a single transaction | error | |
ddl-multi-ddl | Multiple DDL statements per transaction | Supported | Only 1 DDL statement per transaction allowed | error |
Index
| ID | Feature | PG Behavior | DSQL Behavior | Action | Convention |
|---|---|---|---|---|---|
idx-sync-create | Synchronous CREATE INDEX | CREATE INDEX blocks until complete | Must use CREATE INDEX ASYNC | rewrite | |
idx-using-btree | USING btree clause | Supported (redundant, btree is default) | Not supported in CREATE INDEX | strip | |
idx-gin | GIN index | Supported for full-text search, JSONB, arrays | Not supported (B-tree only) | error | |
idx-gist | GiST index | Supported for geometric, range, and text search types | Not supported (B-tree only) | error | |
idx-partial | Partial index (WHERE clause) | Supported | Not supported | error | |
idx-expression | Expression index | Supported (indexes on function results) | Not supported | warn |
DML
| ID | Feature | PG Behavior | DSQL Behavior | Action | Convention |
|---|---|---|---|---|---|
dml-listen-notify | LISTEN/NOTIFY | Supported for pub/sub within the database | Not supported; use EventBridge | error | |
dml-advisory-lock | Advisory locks | pg_advisory_lock for application-level locking | Not supported; use DynamoDB or external lock | error | |
dml-savepoint | Savepoints / nested transactions | SAVEPOINT, RELEASE, ROLLBACK TO supported | Not supported | error | |
dml-unique-index-conflict | uniqueIndex with ON CONFLICT | Works with both UNIQUE INDEX and UNIQUE CONSTRAINT | Requires UNIQUE CONSTRAINT; INDEX fails silently | error | C63 |
dml-select-for-update | SELECT FOR UPDATE behavior | Blocks other writers until lock released | Does NOT block; registers read-set for OCC conflict detection | warn | |
dml-returning-needs-select | RETURNING requires SELECT permission | RETURNING works with INSERT/UPDATE permission alone | RETURNING requires SELECT permission on the table | warn | C30 |
Data Type
| ID | Feature | PG Behavior | DSQL Behavior | Action | Convention |
|---|---|---|---|---|---|
type-jsonb-column | JSONB column type | Native column type with GIN indexing | Not supported as column type; use TEXT + runtime cast | warn | |
type-json-column | JSON column type | Native column type | Not supported as column type; use TEXT + runtime cast | warn | |
type-serial | SERIAL/BIGSERIAL | Auto-incrementing integer shorthand | Not supported; use UUID or GENERATED AS IDENTITY | error | |
type-text-size | TEXT/VARCHAR/BYTEA > 1 MiB | Up to 1 GB per value | Max 1 MiB per value | warn | |
type-range | Range types (tsrange, int4range, etc.) | Native range type support | Not supported | error | |
type-vector | Vector type (pgvector) | Extension-based vector column support | Not supported (no extensions) | error | |
type-citext | CITEXT (case-insensitive text) | Extension-based case-insensitive text type | Not supported; use normalized columns + LOWER() | error | |
type-numeric-precision | Numeric precision > 38 | Up to 1000 digits precision | Max precision 38, max scale 37 | warn |
Transaction
| ID | Feature | PG Behavior | DSQL Behavior | Action | Convention |
|---|---|---|---|---|---|
txn-row-limit | 3,000 row modification limit per transaction | No per-transaction row modification limit | Max 3,000 rows modified per transaction | warn | |
txn-size-limit | 10 MiB transaction size limit | No per-transaction size limit | Max 10 MiB per transaction | warn | |
txn-timeout | 5-minute transaction timeout | Configurable statement_timeout / idle_in_transaction_session_timeout | Hard 5-minute transaction timeout | warn | |
txn-occ-retry | OCC retry required for writes | Pessimistic locking (row locks, table locks) | Optimistic Concurrency Control; write conflicts require retry with codes 40001/OC000/OC001 | rewrite | C39 |
Permission
| ID | Feature | PG Behavior | DSQL Behavior | Action | Convention |
|---|---|---|---|---|---|
perm-alter-default-privs | ALTER DEFAULT PRIVILEGES | Set default permissions for future objects | Not supported; manual GRANT after each CREATE TABLE | strip | |
perm-grant-usage-schema | GRANT USAGE ON SCHEMA | Grant schema access to a role | Not supported or inconsistent | strip | |
perm-revoke-all-tables | REVOKE ALL ON ALL TABLES | Revoke all permissions from all tables | Behaves differently; avoid | strip | |
perm-grant-database | GRANT ON DATABASE | Grant database-level permissions | Not supported (single database named postgres) | strip | |
perm-iam-grant | AWS IAM GRANT | Not applicable | Required to link IAM ARN to database role | rewrite |
Function/Extension
| ID | Feature | PG Behavior | DSQL Behavior | Action | Convention |
|---|---|---|---|---|---|
func-plpgsql | PL/pgSQL functions | LANGUAGE plpgsql for stored procedures and functions | Not supported; SQL-only functions only | error | |
func-extensions | PostgreSQL extensions | CREATE EXTENSION for adding functionality | Not supported | error | |
func-full-text-search | Full-text search (tsvector/tsquery) | Native full-text search support | Not supported | error | |
func-collation | Custom collations | ICU, C, POSIX, locale-aware collations | C collation only | warn |
System Catalog
| ID | Feature | PG Behavior | DSQL Behavior | Action | Convention |
|---|---|---|---|---|---|
catalog-pg-stat-activity | pg_stat_activity | Available for connection monitoring | Not available; use CloudWatch | error | |
catalog-pg-stat-tables | pg_stat_all_tables / pg_stat_all_indexes | Available for table/index statistics | Not available | error | |
catalog-sys-jobs | sys.jobs | Not available | DSQL-specific: async job monitoring (CREATE INDEX ASYNC) | compatible | |
catalog-sys-iam-mappings | sys.iam_pg_role_mappings | Not available | DSQL-specific: IAM-to-PG role mapping verification | compatible |
Connection
| ID | Feature | PG Behavior | DSQL Behavior | Action | Convention |
|---|---|---|---|---|---|
conn-lifetime | Connection lifetime | Unlimited (until pool recycles) | Hard 60-minute limit | warn | |
conn-auth | Authentication | Password, SCRAM, certificates, IAM | IAM only (15-minute token expiry) | rewrite | |
conn-ssl | SSL | Optional or required per config | Mandatory (rejectUnauthorized: true) | rewrite | |
conn-single-database | Multiple databases | Multiple databases per cluster | Single database named postgres | warn |
Action Legend
| Action | Meaning |
|---|---|
compatible | Works on DSQL as-is |
rewrite | Requires code/SQL change to work on DSQL |
strip | Must be removed/skipped for DSQL (unsupported, no equivalent) |
recreate | Requires table recreation workaround (handled by migration runner) |
error | Will fail on DSQL with no automated workaround |
warn | Works but with different behavior or limitations |
app-layer | Requires application-level enforcement (e.g., FK checks) |