paradedb.migrate_from_postgres() copies tables, indexes, and views from a standard PostgreSQL schema into ParadeDB’s high-performance storage engine.
ParadeDB keeps PostgreSQL compatibility while adding fast vector search, hybrid filtering, and scalable indexing. Migrating lets you reuse schemas, clients, and SQL while unlocking AI-ready search.
Ensure PostgreSQL ≥14, superuser rights, and ParadeDB binaries installed. Always back up with pg_dump
before proceeding.
Connect as a superuser and run CREATE EXTENSION IF NOT EXISTS paradedb;
. Verify with \dx
.
Run SELECT paradedb.migrate_from_postgres('public');
.The function copies every table, constraint, and index from public
into a new ParadeDB-managed schema with the same name.
Pass named parameters such as include_tables
, exclude_tables
, move_indexes
, and dry_run
to tailor the migration.
SELECT paradedb.migrate_from_postgres(source_schema=>'public', include_tables=>ARRAY['Customers','Orders'], move_indexes=>TRUE);
Compare row counts: SELECT 'Customers' AS t, (SELECT COUNT(*) FROM Customers) AS pg, (SELECT COUNT(*) FROM paradedb.Customers) AS pddb;
.Use checksums for large tables.
Drop the ParadeDB schema DROP SCHEMA paradedb CASCADE;
or restore from your pre-migration backup.
Migrate in staging first, enable wal_compression
, monitor pg_stat_progress_copy
, and schedule cut-over in low-traffic windows.
If source tables rely on custom types, install the same extensions before running the migration to avoid type errors.
Leaving move_indexes
=FALSE slows queries.Set it TRUE or recreate needed indexes manually after migration.
Create vector indexes with CREATE INDEX ... USING paradedb_ivfflat
, update connection strings, and test application queries against the new schema.
No. ParadeDB runs as a PostgreSQL extension inside the same cluster, so you keep the same connection string.
Time depends on data size and I/O. Expect roughly 1–1.3× the time of a plain COPY
. Use dry_run
to estimate.
.
Yes. Because ParadeDB is a PostgreSQL extension, any driver that speaks Postgres will keep working.
paradedb.migrate_from_postgres() recreates primary keys, foreign keys, and check constraints in the target schema unless you exclude them explicitly.
Set dry_run=>TRUE
. The function prints the actions it would perform without touching data, letting you validate the plan.