Coming from other databases

Coming from PostgreSQL

Using Raft DB's PostgreSQL front-end for a project written for PostgreSQL, how to dump and load the data, and what to check first.

raftdb-pg answers the PostgreSQL protocol (default port 5432): psql, JDBC, pg_dump and the usual drivers connect with their own settings. Start with the PostgreSQL chapter and its limits page: they say, statement by statement, what is accepted and what is refused.

Steps#

  1. Install Raft DB, make an account, and start raftdb-pg (the installer uses the default port, or the next free one if 5432 is taken).
  2. Dump the source with pg_dump in plain format (schema and data), from a copy or a replica.
  3. Load it with psql -h HOST -p 5432 -U USER -f dump.sql. A refused statement names itself in the error; fix the dump or the schema and run again on an empty database.
  4. Point the application's connection string at Raft DB and run its test suite.

Check before you move#

  • Extensions (PostGIS, pg_trgm, pgcrypto and others) are not available.
  • Isolation: SQL transactions are isolated per table at READ-COMMITTED; there is no REPEATABLE READ or SERIALIZABLE snapshot.
  • Features you depend on: check the limits page for table inheritance, logical replication, custom types and procedural languages other than PL/pgSQL.
  • The dialects share the engine but not the tables: a table made through the PostgreSQL port is not visible through the MySQL port. Use the HTTP API to cross over.