Migrating from PostgreSQL to MariaDB


We would like to migrate from Postgre SQL on RHEL5 to MariaDB on RHEL7 . Please help with the approach and the documentation.

Thanks Jack

Answer Answered by Geoff Montee in this comment.

You may have to manually convert the schema to work with MariaDB, but one way to migrate the data is to create foreign tables in MariaDB that reference the tables in PostgreSQL using CONNECT storage engine along with a PostgreSQL ODBC or JDBC driver. And then you could do something like:

INSERT INTO local_tab SELECT * FROM foreign_tab;

You could also do the opposite and use mysql_fdw to create foreign tables on the PostgreSQL side that reference tables in MariaDB. And then you could do something like:

INSERT INTO foreign_tab SELECT * FROM local_tab;


Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.