Skip to content

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

IDFeaturePG BehaviorDSQL BehaviorActionConvention
ddl-foreign-keyForeign KeysFully enforced referential integrityAccepted in syntax but NOT enforced at runtimeapp-layer
ddl-triggerTriggersCREATE TRIGGER fully supportedNot supportedstrip
ddl-temp-tableTemporary TablesCREATE TEMP TABLE supportedNot supportederror
ddl-sequenceSequencesCREATE SEQUENCE supportedNot supported; use GENERATED AS IDENTITY with cache >= 65536 or UUIDsstrip
ddl-plpgsql-doPL/pgSQL DO blocksDO $$ blocks execute procedural codeNot supported; SQL-only functions onlystrip
ddl-rlsRow Level SecurityENABLE/DISABLE/FORCE ROW LEVEL SECURITY, CREATE POLICYNot supported; use IAM + GRANT for access controlstrip
ddl-alter-drop-columnALTER TABLE DROP COLUMNSupportedNot supported; requires table recreationrecreateC73
ddl-alter-typeALTER TABLE ALTER COLUMN TYPESupportedNot supported; requires table recreationrecreateC73
ddl-alter-set-defaultALTER TABLE SET DEFAULTSupportedNot supported; requires table recreationrecreateC73
ddl-alter-drop-defaultALTER TABLE DROP DEFAULTSupportedNot supported; requires table recreationrecreateC73
ddl-alter-set-not-nullALTER TABLE SET NOT NULLSupportedNot supported; requires table recreationrecreateC73
ddl-alter-drop-not-nullALTER TABLE DROP NOT NULLSupportedNot supported; requires table recreationrecreateC73
ddl-alter-add-constraintALTER TABLE ADD CONSTRAINTSupportedNot supported; constraints must be in CREATE TABLErecreate
ddl-alter-drop-constraintALTER TABLE DROP CONSTRAINTSupportedNot supported; requires table recreationrecreate
ddl-truncateTRUNCATE TABLESupportedNot supported; rewrite to DELETE FROM (batch) or DROP+CREATErewrite
ddl-check-constraint-alterCHECK constraint via ALTER TABLESupportedNot supported; CHECK constraints must be in CREATE TABLErecreate
ddl-mixed-ddl-dmlDDL + DML in same transactionSupportedNot supported; DDL and DML cannot be mixed in a single transactionerror
ddl-multi-ddlMultiple DDL statements per transactionSupportedOnly 1 DDL statement per transaction allowederror

Index

IDFeaturePG BehaviorDSQL BehaviorActionConvention
idx-sync-createSynchronous CREATE INDEXCREATE INDEX blocks until completeMust use CREATE INDEX ASYNCrewrite
idx-using-btreeUSING btree clauseSupported (redundant, btree is default)Not supported in CREATE INDEXstrip
idx-ginGIN indexSupported for full-text search, JSONB, arraysNot supported (B-tree only)error
idx-gistGiST indexSupported for geometric, range, and text search typesNot supported (B-tree only)error
idx-partialPartial index (WHERE clause)SupportedNot supportederror
idx-expressionExpression indexSupported (indexes on function results)Not supportedwarn

DML

IDFeaturePG BehaviorDSQL BehaviorActionConvention
dml-listen-notifyLISTEN/NOTIFYSupported for pub/sub within the databaseNot supported; use EventBridgeerror
dml-advisory-lockAdvisory lockspg_advisory_lock for application-level lockingNot supported; use DynamoDB or external lockerror
dml-savepointSavepoints / nested transactionsSAVEPOINT, RELEASE, ROLLBACK TO supportedNot supportederror
dml-unique-index-conflictuniqueIndex with ON CONFLICTWorks with both UNIQUE INDEX and UNIQUE CONSTRAINTRequires UNIQUE CONSTRAINT; INDEX fails silentlyerrorC63
dml-select-for-updateSELECT FOR UPDATE behaviorBlocks other writers until lock releasedDoes NOT block; registers read-set for OCC conflict detectionwarn
dml-returning-needs-selectRETURNING requires SELECT permissionRETURNING works with INSERT/UPDATE permission aloneRETURNING requires SELECT permission on the tablewarnC30

Data Type

IDFeaturePG BehaviorDSQL BehaviorActionConvention
type-jsonb-columnJSONB column typeNative column type with GIN indexingNot supported as column type; use TEXT + runtime castwarn
type-json-columnJSON column typeNative column typeNot supported as column type; use TEXT + runtime castwarn
type-serialSERIAL/BIGSERIALAuto-incrementing integer shorthandNot supported; use UUID or GENERATED AS IDENTITYerror
type-text-sizeTEXT/VARCHAR/BYTEA > 1 MiBUp to 1 GB per valueMax 1 MiB per valuewarn
type-rangeRange types (tsrange, int4range, etc.)Native range type supportNot supportederror
type-vectorVector type (pgvector)Extension-based vector column supportNot supported (no extensions)error
type-citextCITEXT (case-insensitive text)Extension-based case-insensitive text typeNot supported; use normalized columns + LOWER()error
type-numeric-precisionNumeric precision > 38Up to 1000 digits precisionMax precision 38, max scale 37warn

Transaction

IDFeaturePG BehaviorDSQL BehaviorActionConvention
txn-row-limit3,000 row modification limit per transactionNo per-transaction row modification limitMax 3,000 rows modified per transactionwarn
txn-size-limit10 MiB transaction size limitNo per-transaction size limitMax 10 MiB per transactionwarn
txn-timeout5-minute transaction timeoutConfigurable statement_timeout / idle_in_transaction_session_timeoutHard 5-minute transaction timeoutwarn
txn-occ-retryOCC retry required for writesPessimistic locking (row locks, table locks)Optimistic Concurrency Control; write conflicts require retry with codes 40001/OC000/OC001rewriteC39

Permission

IDFeaturePG BehaviorDSQL BehaviorActionConvention
perm-alter-default-privsALTER DEFAULT PRIVILEGESSet default permissions for future objectsNot supported; manual GRANT after each CREATE TABLEstrip
perm-grant-usage-schemaGRANT USAGE ON SCHEMAGrant schema access to a roleNot supported or inconsistentstrip
perm-revoke-all-tablesREVOKE ALL ON ALL TABLESRevoke all permissions from all tablesBehaves differently; avoidstrip
perm-grant-databaseGRANT ON DATABASEGrant database-level permissionsNot supported (single database named postgres)strip
perm-iam-grantAWS IAM GRANTNot applicableRequired to link IAM ARN to database rolerewrite

Function/Extension

IDFeaturePG BehaviorDSQL BehaviorActionConvention
func-plpgsqlPL/pgSQL functionsLANGUAGE plpgsql for stored procedures and functionsNot supported; SQL-only functions onlyerror
func-extensionsPostgreSQL extensionsCREATE EXTENSION for adding functionalityNot supportederror
func-full-text-searchFull-text search (tsvector/tsquery)Native full-text search supportNot supportederror
func-collationCustom collationsICU, C, POSIX, locale-aware collationsC collation onlywarn

System Catalog

IDFeaturePG BehaviorDSQL BehaviorActionConvention
catalog-pg-stat-activitypg_stat_activityAvailable for connection monitoringNot available; use CloudWatcherror
catalog-pg-stat-tablespg_stat_all_tables / pg_stat_all_indexesAvailable for table/index statisticsNot availableerror
catalog-sys-jobssys.jobsNot availableDSQL-specific: async job monitoring (CREATE INDEX ASYNC)compatible
catalog-sys-iam-mappingssys.iam_pg_role_mappingsNot availableDSQL-specific: IAM-to-PG role mapping verificationcompatible

Connection

IDFeaturePG BehaviorDSQL BehaviorActionConvention
conn-lifetimeConnection lifetimeUnlimited (until pool recycles)Hard 60-minute limitwarn
conn-authAuthenticationPassword, SCRAM, certificates, IAMIAM only (15-minute token expiry)rewrite
conn-sslSSLOptional or required per configMandatory (rejectUnauthorized: true)rewrite
conn-single-databaseMultiple databasesMultiple databases per clusterSingle database named postgreswarn

Action Legend

ActionMeaning
compatibleWorks on DSQL as-is
rewriteRequires code/SQL change to work on DSQL
stripMust be removed/skipped for DSQL (unsupported, no equivalent)
recreateRequires table recreation workaround (handled by migration runner)
errorWill fail on DSQL with no automated workaround
warnWorks but with different behavior or limitations
app-layerRequires application-level enforcement (e.g., FK checks)