Move tables, data, and indexes from ParadeDB (PostgreSQL) to MariaDB using dump, transform, and load tools.
Teams move to MariaDB for lower licensing cost, MySQL-compatible tooling, or to standardize on a single engine. A structured plan avoids data loss and downtime.
Install pg_dump, MariaDB client, and pgloader
. Ensure network access between the ParadeDB host and the MariaDB server. Create matching users and empty databases in MariaDB.
Use pg_dump
with --data-only
or --schema-only
flags. Plain SQL format simplifies type mapping, while CSV suits bulk loads via LOAD DATA INFILE
.
Map serial
to AUTO_INCREMENT
, boolean
to TINYINT(1)
, and bytea
to BLOB
. Replace PostgreSQL’s UUID
with CHAR(36)
or MariaDB’s UUID
plugin.
Pipe the transformed SQL into mysql
, or bulk-load CSV files using LOAD DATA LOCAL INFILE
. Disable foreign keys during load for speed, then re-enable and validate.
Run row counts on both systems (SELECT COUNT(*) FROM Customers
). Spot-check aggregates like total order_amount. Use checksums for critical tables.
Run a rehearsal on staging. Freeze writes to ParadeDB, capture an incremental dump, load into MariaDB, and swap connections. Keep ParadeDB in read-only mode for fallback.
Create covering indexes for frequent joins, increase innodb_buffer_pool_size
, and analyze slow query logs. Verify that sequences became AUTO_INCREMENT
and that UTF-8 encodings match.
pgloader postgres://user:pass@paradedb/shop mysql://user:pass@mariadb/shop \
--with "batch rows = 5000" \
--cast "type boolean to tinyint"
Yes. Tools like AWS DMS or maxwell
can stream changes, allowing blue-green cutovers with minimal downtime.
Most basic DML does, but functions, window clauses, and CTEs may differ. Test critical queries and refactor where needed.
ParadeDB uses PostgreSQL’s tsvector
. In MariaDB, migrate to FULLTEXT
indexes or integrate an external search engine.