Why teams make this move
Applications built on MariaDB (a lot of PHP systems among them) are being rewritten or modernized, and the new stack often targets PostgreSQL. Changing the database does not fix an application by itself; the rewrite does. What the project still needs is the existing data, in the new database, verified. That is the part dbSlice does.

What dbSlice does
- Connects to MariaDB with its own profile and to PostgreSQL, with nothing extra to install.
- Lists system-versioned tables (MariaDB 10.3+), which a generic MySQL connection can miss.
- Reads in small batches, so the live database keeps serving its users.
- Writes to PostgreSQL in bulk for initial and full loads.
- Shows the target DDL. If the PostgreSQL table does not exist, dbSlice stops before writing and shows a
CREATE TABLEtranslated from MariaDB for your DBA to review and run. It does not create objects in your databases by itself. - Checks before and after: Record Diff compares keys on both sides; on-screen checks run before anything is written.
- Keeps ids safe. After rows are copied with their
AUTO_INCREMENTids, the PostgreSQL sequence can be behind the highest id. dbSlice warns and shows the command to move it forward.
dbSlice moves data. It does not convert stored procedures, triggers or views.
Details to plan for
1. Unsigned integers. PostgreSQL has no unsigned types, so dbSlice reads the declared MariaDB type and suggests a wider one, where the largest value fits: SMALLINT UNSIGNED → INTEGER, INT UNSIGNED and MEDIUMINT UNSIGNED → BIGINT, BIGINT UNSIGNED → NUMERIC(20,0).
2. TINYINT(1) booleans. They are suggested as BOOLEAN, and dbSlice converts 0/1 into false/true. A TINYINT(1) used as a number (values 2, 3…) would arrive as true: change that column to SMALLINT in the CREATE TABLE before running it.
3. Zero dates. MariaDB can hold 0000-00-00, which PostgreSQL rejects. dbSlice reads a zero date as NULL, without changing anything in MariaDB, so the target column must allow NULL.
4. ENUM, SET, YEAR. Suggested as TEXT. Keep it, or add a CHECK or a PostgreSQL enum yourself.
5. JSON columns. MariaDB keeps JSON as text, so the suggested column is TEXT. If you want JSONB, declare it in the CREATE TABLE before the load.
Step by step
- Connect to MariaDB and PostgreSQL.
- Pick the source table (or a SELECT) and the target table.
- Choose the key column used to match rows.
- Choose the mode: Initial load first, then Upsert or Insert new.
- Check before writing with Record Diff and the on-screen checks.
- Run it, or save it as a job and schedule it from the CLI. The Replicator copies a list of tables in one run, parents before children.
Keep both in sync until cutover
Schedule an Upsert job every night. With a column that only grows (updated_at or the AUTO_INCREMENT id), each run reads only the rows above the last value it saw. Deletes in MariaDB are not detected by incremental runs, so plan a full comparison or a reload before the switch.
FAQ
Does dbSlice convert MariaDB stored procedures, triggers or views?
No. dbSlice moves data. It does not convert stored procedures, triggers or views.
What about system-versioned tables?
dbSlice connects to MariaDB with its own profile and lists system-versioned tables (MariaDB 10.3+), which a generic MySQL connection can miss.
Can I keep MariaDB and PostgreSQL in sync until cutover?
Yes. Schedule an Upsert job every night; with a column that only grows, each run reads only the rows above the last value it saw. Incremental runs do not detect deletes, so plan a full comparison or a reload before the switch.
Also works for
MySQL to PostgreSQL, SQL Server to PostgreSQL, SQLite to PostgreSQL, and PostgreSQL back into MariaDB (see PostgreSQL to MySQL and MariaDB).
Try it
The free version on the Microsoft Store connects, shows the data, compares and exports to CSV, with no license key. Copying and syncing into the target needs a Desktop or Server license (perpetual, with optional yearly maintenance, 14-day money-back guarantee).