HexaCluster LogoHexaCluster Logo
  • Services
  • Products
  • HexaRocket
  • Blog
  • Resources
  • Company
  • Contact Us
Schedule a Demo
Stay Updated

Subscribe to Newsletters

Be the first to know! Stay updated with the latest insights, database migration benchmarks, and technical updates from HexaCluster.

HexaCluster LogoHexaCluster Logo

Enterprise-grade Database migration, modernization, and tooling for teams moving off legacy databases.

  • One Dundas Street West, Suite 2500, Toronto, Ontario, M5G 1Z3, Canada
  • HexaCluster DMCC, Plot No: JLT-PH2-RET-R6 Jumeirah Lakes Towers, Dubai, UAE
connect@hexacluster.ai+1 (902) 221-5976

Security & Compliance

SOC 2 Type 1 reportSOC 2 Type 2 report, monitored by Comp AIGDPR compliantISO 27001AICPA SOC for Service Organizations

Products

  • DMAT
  • HexaRocket
  • HexaBridge
  • HexaTranspile
  • MyBatis2Pg
  • HexaReplicate
  • Download Products

HexaRocket

  • Supported Database Migrations
  • Migrate to Yugabyte
  • About HexaRocket
  • Migrate to Oracle
  • Migrate to PostgreSQL
  • Migrate to MariaDB

Services

  • Database Migration to PostgreSQL
  • Application Migration and Modernization
  • AI/ML and MLOps
  • Architectural Health Audit
  • Managed DBA Services
  • Performance Tuning
  • PostgreSQL Development
  • Training for DBAs & Developers
  • 24/7 Support
  • Supported Tools and Extensions

Company

  • Blog
  • Case Studies
  • Webinars
  • Announcements
  • About Us
  • Referral Program
  • Events
  • Contact Us

© HexaCluster 2026. All rights reserved. Privacy PolicyThis site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

HEXACLUSTERHEXACLUSTERHEXACLUSTER

HexaRocket Now Migrates Foreign Keys to Aurora DSQL

Akhil Reddy Banappagari,Suman Michael
Aug 30, 2026
AWSAurora DSQL#Aurora DSQL HexaRocket foreign keys

HexaRocket Now Migrates Foreign Keys to Aurora DSQL

On August 27, 2026, AWS announced that Amazon Aurora DSQL now supports foreign key constraints. Anyone planning an Aurora DSQL migration just stopped having to give something up. The referential integrity you declared in Oracle, SQL Server, MySQL or PostgreSQL no longer has to be dropped on the way in. HexaRocket has supported DSQL as a migration target from all four of those sources for a while now, across schema conversion, data migration, change data capture and validation, and today we are adding foreign keys to Aurora DSQL to that list. One day after the announcement by AWS. As far as we know, HexaRocket is the only migration tool on the planet doing end to end Aurora DSQL migration at all, and we have made a point of tracking DSQL feature by feature as AWS ships them instead of waiting for a quarterly roadmap slot.

Webinar HexaRocket

Homogeneous and Heterogeneous Database Migrations to AWS with HexaRocket

Same-engine and cross-engine migrations into AWS, covering schema conversion, data migration, CDC and rollback.

Sep 23, 2026 ·10:00 AM EST·60 minutes

Register for the webinar

Some background on HexaRocket

HexaRocket, is an end-to-end database migration tool from HexaCluster, the creators of Ora2Pg, pgBadger, credcheck and more tools and extensions for PostgreSQL. HexaRocket supports database migration with live replication and rollback from Oracle, SQL Server, MySQL, MariaDB, Sybase ASE and DB2 to PostgreSQL and Postgres compatible databases like AWS RDS/Aurora PostgreSQL, YugabyteDB, Percona Distribution for PostgreSQL, EDB and other forks.

We already had DSQL supported as a target

DSQL as a HexaRocket target is not new. Schema migration, data migration, log-based (transaction log-based) CDC, batch CDC (ETL mode), validation and reverse replication were already running into DSQL from Oracle, SQL Server, MySQL and PostgreSQL sources before this week.

What AWS shipped on August 27

You can now declare FOREIGN KEY constraints on new and existing tables in a DSQL cluster. See the foreign key documentation from AWS for more details. All five referential actions, NO ACTION, RESTRICT, CASCADE, SET NULL and SET DEFAULT, both the MATCH FULL and MATCH SIMPLE match types, and deferrable constraints are all now available in every region where DSQL runs.

How DSQL enforces the constraint is something important to know. There is no locking in the PostgreSQL sense. A transaction verifies the constraint against its start-time snapshot, then DSQL implicitly applies KEY SHARE to the referenced rows and settles the argument at commit. If a concurrent transaction deleted the row you were pointing at, your commit fails with ERROR: change conflicts with another transaction (OC000) (SQLSTATE 40001) instead of waiting on a lock. That is just DSQL's optimistic concurrency model doing its job. What it means for a migration tool is a separate question, and I get to it further down.

AWS is also explicit that referential integrity checks cost extra reads on every DML against a referenced or referencing table. Benchmark before you put a foreign key on a hot table. That is their advice, and it is good advice.

What we actually had to change to support Foreign keys during Schema Migration this quick

HexaRocket has always supported PostgreSQL as a target, including AWS RDS PostgreSQL and Aurora PostgreSQL, from source databases like Oracle, SQL Server, MySQL, Sybase and DB2. It has been extracting DDL from those sources for years, for every target we support. That extraction does not change per target. What changes is what happens next.

When the target is DSQL, the conversion stage walks the extracted object set and filters out whatever DSQL cannot accept. Triggers go. PL/pgSQL bodies go, since DSQL supports SQL functions but not procedural languages. Temporary tables, tablespaces and TRUNCATE go, per the PostgreSQL to Aurora DSQL migration guidance. Until August 27, foreign keys went too.

We already had the constraint fully parsed. Referencing table and columns, referenced table and columns, the ON DELETE and ON UPDATE actions, the match type, the deferrability. All of it sitting in the parse tree. We just refused to emit it, and printed an unsupported-object message instead.

So the change was to stop refusing. Update the grammar to emit the constraint in DSQL's dialect, map each source's referential action vocabulary onto DSQL's, let it through. The transformation and the end to end testing across all four sources took less than a few hours.

That is only possible because HexaRocket's schema conversion is deterministic. There is no AI and no LLM anywhere in the conversion path. The engine parses source DDL into a real parse tree and emits target dialect DDL through grammar rules, so a new target capability is a grammar change with a test suite behind it rather than a prompt to re-tune.

Had the conversion been model-generated, the same change would have been non-deterministic. The same source foreign key could come out one way on one run and another way on the next, and every emitted constraint would need validating by hand before anyone could sign off on the schema. That is days or weeks of work rather than hours during the conversion of large volumes of schema objects and databases, and no amount of extra testing makes it go away.

Mapping each source onto DSQL

The one part that needed real thought was the referential action vocabulary, because the four sources (Oracle, SQL Server, MySQL, PostgreSQL) do not agree on it. Oracle only implements ON DELETE CASCADE and ON DELETE SET NULL, and has no ON UPDATE clause at all. SQL Server and MySQL carry the wider set. PostgreSQL sits closest to DSQL, since DSQL follows PostgreSQL constraint semantics. So the Schema conversion engine of HexaRocket maps each source's vocabulary onto what DSQL accepts instead of assuming a passthrough.

In the following screenshot, we can see the HexaRocket dashboard that shows the DDL of one of the Foreign keys in MySQL and the converted foreign key constraint in DSQL.

image

Schema migration to DSQL, in full

Foreign keys join an object set HexaRocket already converts and deploys for DSQL from Oracle, SQL Server, MySQL and PostgreSQL sources.

  • Tables, with primary keys and unique constraints
  • Indexes, emitted as CREATE INDEX ASYNC, which is what DSQL wants for non-blocking creation
  • Sequences and identity columns
  • Views
  • Functions, within what DSQL's SQL function support allows
  • Foreign keys, as of today
  • DSQL-specific datatype handling throughout

Following is a screenshot showing the Schema Conversion status from MySQL to Aurora DSQL.

image

DSQL is PostgreSQL compatible on the wire and through most of the language, but its DDL is not PostgreSQL's DDL. Copy a schema straight across from a PostgreSQL source and it will fail on index syntax, on temporary tables, on trigger definitions and on procedural function bodies. Emitting DSQL's own dialect is why the schema deploys instead of handing you a list of errors to work through by hand.

Consulting

PostgreSQL Performance and Operations

PostgreSQL consulting across tuning, architecture and day to day operations.

  • Performance tuning
  • Architectural health audit
  • Query and index optimization
  • Managed DBA and 24x7x365 support
PostgreSQL consulting
Schema conversion HexaRocket

Oracle, SQL Server, MySQL, PostgreSQL to Aurora DSQL

Automated conversion of the code objects that decide a migration timeline.

  • 100 percent automatic code object conversion
  • Deterministic, no LLMs
  • Packages, procedures, functions, triggers, views
  • Assessment and effort estimate up front
  • Oracle
  • SQL Server
  • Sybase ASE
  • DB2
  • MySQL
  • MariaDB
Explore HexaRocket
Data movement HexaRocket

Data Migration, CDC and Rollback

Homogeneous and heterogeneous data movement, validated end to end.

  • Initial load with validation
  • CDC with validation
  • Rollback with reverse replication
  • Advanced UI, secured and production grade
  • Oracle
  • SQL Server
  • Sybase ASE
  • DB2
  • MySQL
  • MariaDB
  • PostgreSQL
Explore HexaRocket

Data migration into DSQL

Loading large volumes of data into a distributed database is a different exercise from loading into a single-node PostgreSQL instance. DSQL's architecture brings a few real challenges that migration tooling has to handle well, and HexaRocket engineered its data migration path around each of them.

Transaction sizing

DSQL bounds how much a single transaction can change, in both rows and size. A loader that ignores this will see writes rejected partway through a migration. HexaRocket sizes each write batch to stay within those bounds and, when a batch still comes back too large, automatically splits and shrinks it and retries, so the load keeps moving without manual tuning.

Concurrency conflicts

DSQL uses a lock-free, optimistic concurrency model. Rather than blocking, it surfaces conflicts at commit time as serialization errors, so under parallel load a share of commits will be rejected and need to be retried. HexaRocket detects these conflicts and retries automatically with exponential backoff and jitter, so parallel workers converge instead of failing.

Multiple sources

Data migration to DSQL is available from Oracle, SQL Server, MySQL, and PostgreSQL sources. The result is that migrating data into DSQL at scale works reliably, with HexaRocket absorbing the distributed-system details so the user does not have to.

Following screenshot from hexaRocket shows the Data Migration Progress of one of the migration projects from MySQL to DSQL.

image

Keeping DSQL in sync

Log-based CDC reads the source's change log directly, whether that is Oracle redo, the SQL Server transaction log, the MySQL binlog or PostgreSQL WAL. HexaRocket converts each captured row change into the DSQL dialect statement and applies it continuously, so the target tracks the source in near real time. In a typical migration it runs after the initial load. It also runs standalone against an already-populated target when only ongoing changes need to flow. The apply path obeys the same DSQL rules as the initial load, batch bounds and serialization retries included, which is what keeps replication healthy through wide-row episodes and write spikes with nobody watching it.

HexaRocket CDC dashboard for a DSQL target. Replication lag, applied change counts and per-table status.

image

Batch CDC is the alternative where log-based capture is not the right fit, whether because of source permissions, a source that exposes no usable log, or tables where polling is simply cheaper. It tracks changed rows through a watermark column and applies them to DSQL through a stageless, conflict-aware upsert path. Same discipline on the target side, different way of capturing the change.

image

Reverse replication out of DSQL is supported too, which is what allows you to achieve rollback from DSQL to MySQL and other supported databases using HexaRocket. How all three work underneath, the log position tracking, the ordering guarantees, the conflict-aware apply path, deserves its own articles and will get them.

Where this leaves an Aurora DSQL migration today

CapabilityStatus
Schema migration (tables, primary keys, unique constraints, indexes, sequences, views, functions)Supported
DSQL-specific datatype handlingSupported
Foreign keys to Aurora DSQLSupported, August 28, 2026
Data migration to DSQL (Oracle, SQL Server, MySQL, PostgreSQL)Supported
Log-based CDC to DSQL (Oracle, SQL Server, MySQL, PostgreSQL)Supported
Batch CDC to DSQLSupported
Data validationSupported
Reverse replication out of DSQLSupported

See it on your own schema

If you are weighing Amazon Aurora DSQL as a target for an Oracle, SQL Server, MySQL or PostgreSQL database, we will show you what your schema looks like on the other side, foreign keys included. Ask us for a demo at hexacluster.ai/contact-us, or read more about HexaRocket and the database migrations we support. If you want a migration effort estimate before you commit to anything, start with DMAT, our free assessment tool.

If you are migrating off legacy or complex Oracle, SQL Server, DB2, Sybase, MySQL, MariaDB workloads, HexaCluster provides end to end database migration to PostgreSQL and application migration and modernization, with HexaRocket automating the schema and code conversion. Once you are live, we also offer managed DBA services and 24x7x365 support.

To start a conversation, write to us at connect@hexacluster.ai or reach the HexaCluster PostgreSQL consulting team.

Subscribe to our newsletter and stay tuned.


Authors

Akhil Reddy Banappagari

Akhil Reddy Banappagari

Senior Development Manager

Akhil is a Senior Development Manager at HexaCluster with expertise in architecting and developing enterprise applications using Java Spring Boot, Golang, Python, and other modern technologies. He has worked extensively with Oracle, PostgreSQL, SQL Server, MySQL, Snowflake, and various other databases, and is highly experienced in complex database and application migrations.

Suman Michael

Suman Michael

Technical Director - R&D

Suman Michael, Technical Director for R&D at HexaCluster, with a focus on machine learning (ML), deep learning (DL), and generative AI (GenAI), brings a wealth of expertise to the table. With a mastery of languages such as C, Go, Rust, Java, Python, and JavaScript, he excels in crafting robust, data-intensive, and concurrent systems. Michael’s proficiency extends to PostgreSQL development and administration, showcasing his well-rounded technical prowess. A devoted advocate of open source, he remains actively engaged in contributing to its community, further enriching the collaborative landscape of technology.

Start your migration journey 🚀

start your migration journey with our expert team

Products

DMAT

Database & Application Migration Assessment Tool

HexaRocket

End-to-End Database Migration & Modernization Tool

HexaTranspile

Database Code Object Conversion to PostgreSQL

MyBatis2Pg

MyBatis Mapper Conversion to PostgreSQL

HexaReplicate

Enterprise Data Replication & Live CDC

HexaBridge

Oracle Compatibility Layer for PostgreSQL

HexaRocket 🚀

Oracle to PostgreSQLSQL Server to PostgreSQLMySQL to PostgreSQLMariaDB to PostgreSQLAny to Any databases

Migration Services

Database MigrationsApplication Modernization

PostgreSQL Consulting

Architectural AuditsPerformance TuningTraining & Support