Migrate from pgvector to Qdrant

Moving embeddings from PostgreSQL with pgvector to self-hosted Qdrant is a planned data move plus a change in how filters, payloads and operations work. This page covers when the move is worth it, how the migration tool's pg subcommand fits, and what the work involves.

On this page

Migrate from pgvector to Qdrant only when the vector workload has outgrown Postgres

Moving embeddings from PostgreSQL with pgvector to Qdrant is a planned data migration that also changes application code and day-two operations. The effort depends on four things: how many tables and vector columns hold embeddings, how many vectors each one contains and how large their payloads are, how complex the SQL filters on similarity queries have become, and how many services query Postgres for similarity today. Each one adds mapping work, client changes and testing. pgvector can remain the right answer for many workloads, especially where vectors must join transactional rows in the same query and current latency and recall meet requirements. This page assumes the decision to move has already been made and that the team can name the reason, such as filtering that has outgrown SQL plans or similarity search load that competes with the primary database.

Start by inventorying what pgvector does today. List each table, vector column, dimension, distance operator, index type and the predicates attached to similarity queries. Those predicates matter most, because Qdrant evaluates filters against payload fields, so every column a query filters on needs a payload plan and, where selectivity matters, a payload index. Record which rows stay in Postgres as the system of record, and ask the database owners which queries join vectors with relational data, since those joins become application logic after the move. Confirm the embedding model, vector dimension and distance metric in writing before any data is copied. A mismatch in these values often shows up later as lower quality results rather than as a clear failure, so make the check part of the scope.

What maps cleanly from pgvector to Qdrant and what does not

This table compares the main pgvector concepts with their Qdrant counterparts and marks which ones carry over directly and which need redesign. Read the middle column first to confirm the mapping, then check the last column for work your application and data model must absorb before cutover.

Conceptpgvector in PostgreSQLQdrant and what to plan
Storage unitRows in a table with a vector columnPoints in a collection, each with an ID, a vector and an optional payload; plan how the row primary key becomes the point ID
Vector fieldA vector column with a fixed dimensionOne or more vectors per point; define the size and distance metric when creating the collection, and confirm named vector support in the migration tool docs for your version
Distance operatorsOperators such as cosine, L2 and inner product chosen per queryDistance is fixed per vector at collection creation, so match the operator your embeddings were trained for before migrating
Metadata filtersSQL WHERE clauses on ordinary columnsFilters are sent in each search or scroll request against payload fields; create payload indexes for fields you filter on frequently
Joins and related tablesQueries join embeddings to users, documents or permissions in one statementNo joins; denormalize the fields you need into payload or keep the relational lookup in PostgreSQL and pass resulting IDs as a filter
TransactionsVector and business rows update in one transactionNo cross-collection transactions; design an idempotent write order and reconciliation so embeddings and source rows cannot drift apart
Index definitionHNSW or IVFFlat index on the column, built with SQLCollection-level vector index and optimizer settings; verify index parameters and recall against the migration tool and Qdrant docs for the chosen version
Access controlDatabase roles and row-level securityAPI keys and JWT per-collection permissions; payload-based restrictions must be enforced by your application or token scope, so test them separately

Documented paths for moving pgvector data into Qdrant

Qdrant documents one import path for pgvector data, the Qdrant Migration Tool, and a standard API for any custom loader you need to write. The cards below cover what the tool does, how to run it against PostgreSQL, and what to check before you rely on it for a production move.

Qdrant Migration Tool with the pg subcommand

The Migration Tool's pg subcommand reads embeddings from a PostgreSQL table with pgvector and writes them into a Qdrant collection. It is the documented import path for this source, so check it first. Confirm the exact flags and source table options in the migration tool docs for your tool version, since the schema you pass in determines which vector column and payload columns are carried over. Run it against a test copy of the table before the production move.

Migration tool docs

Parallel workers for large tables

The tool supports running multiple workers so that large embedding tables move in parallel rather than as one long sequential read. More workers shorten the run but add load on the PostgreSQL primary and on the Qdrant cluster, so test the setting against a staging copy first. Watch database connection limits and I/O during the run, and consider reading from a replica if your team runs one.

Batch streaming and resumable runs

The tool streams rows in batches instead of loading the whole table into memory, and it can resume an interrupted run. This matters when a migration spans hours and the network or either database drops mid-run. Record which table, collection and batch settings were used, and confirm the resume behavior with a deliberate interruption in staging before you depend on it.

Container or binary deployment

The Migration Tool runs as a container image or a standalone binary, so it can run from a jump host or a build pipeline inside the same network as PostgreSQL and Qdrant. Keep the tool close to both systems to avoid moving embeddings over long routes. Pin the tool version you tested, and record the credentials it uses so they can be rotated after the migration.

Custom loader through the Qdrant API

When the tool does not fit your schema, for example when vectors are stored in a non-standard column layout or need transformation before writing, write a custom loader against the Qdrant API with an official client SDK. This is the fallback path, not the first choice. Your loader then owns batching, retries, ID mapping and payload construction, so plan testing for each of these before the cutover.

Migration tool docs

How a pgvector to Qdrant migration runs from inventory to decommission

This sequence moves embeddings out of PostgreSQL with pgvector into a self-hosted Qdrant deployment while keeping search results checked against the source at every stage. Each phase closes with a written output that the next phase depends on.

  1. Inventory tables, vector columns and queries

    Map every table that holds a pgvector column, including the vector dimension, the distance operator used in queries (cosine, inner product or Euclidean), the row count, and the non-vector columns that filters depend on. Collect the actual SQL the application runs, because the WHERE clauses define which payload fields and indexes Qdrant needs. Owned by the data owner with the application team. Done when each embedding source has a one-page record listing its dimension, metric, filter fields and the owning service.

  2. Design the target collection and payload model

    Decide how each source table maps to a Qdrant collection, which scalar columns move into payload, which fields need payload indexes, and how row primary keys become point IDs so records can be traced back to PostgreSQL. Confirm the vector size and distance setting match the source embeddings, and confirm the exact collection options against the current Qdrant migration tool and installation documentation before writing any configuration. Done when a reviewed schema document exists and both the data owner and the application team have signed off on it.

  3. Stand up a non-production Qdrant target

    Deploy a test Qdrant instance in the infrastructure you control, following the storage rules in the installation docs (block storage with a POSIX-compatible file system, not NFS or object storage). Enable API keys and TLS before any data is loaded, because a default self-hosted instance has no authentication. Done when the test instance accepts authenticated requests and a health check passes from the migration host.

  4. Run a pilot migration on a copy

    Copy one representative table to a non-production PostgreSQL instance, then run the Qdrant Migration Tool's pg subcommand against it with a conservative batch size and a small number of workers. Record run time, error counts and whether an interrupted run resumed cleanly. Confirm the exact flags and parallel worker options in the migration tool documentation for the version you run. Done when the pilot collection's point count matches the source row count for the selected rows.

  5. Compare recall and results against pgvector

    Take a sample of real query vectors and the filter combinations from the inventory, run each one against pgvector and against the pilot Qdrant collection, and compare the top results. Check that filtered queries return the same candidates, that payload types were preserved, and that score ordering matches the chosen distance metric. Investigate any gap before continuing, since approximate search can differ between engines. Done when a written comparison report shows agreed result sets for the agreed sample, with each difference explained.

  6. Run the full migration and a parallel period

    Migrate every in-scope table into the production Qdrant cluster, then run pgvector and Qdrant side by side. Either send reads to both and compare, or send a copy of production queries to Qdrant as shadow traffic without returning its results to users. The exact method (dual reads, shadow queries or another pattern) is decided during scoping. Done when comparison logs for the agreed period show results within the thresholds set in the scoping document and no unresolved write-path differences.

  7. Cut over clients and API keys

    Switch application configuration to the Qdrant endpoint, issue scoped API keys or JWT-based access per service and collection, and keep the pgvector path available as a fallback until the cutover window closes. Confirm that the ingestion path writes new embeddings to Qdrant and to PostgreSQL as agreed, so the two stores stay consistent. Done when every client reads from Qdrant with its own key, audit logs show the expected authenticated operations, and the rollback steps have been rehearsed.

  8. Decommission the old vector columns

    After the agreed retention period and a final backup of the PostgreSQL tables, drop the pgvector columns and indexes, and remove the extension from databases where nothing else uses it. Keep the source rows that serve as the system of record unless the scoping document says otherwise. Done when the schema change is recorded in version control, the backup restore has been tested, and monitoring confirms no queries still reference the removed columns.

What changes for filtering, payloads and query shape

In pgvector, a WHERE clause on relational columns runs inside the same query planner as the vector search. In Qdrant, that clause becomes a filter over the payload, the JSON object stored with each point. Each SQL column you filter on maps to a payload key, so tenant_id, status and created_at move into the payload during the migration and the filter conditions are rewritten against those keys. Filters are not translated automatically, so the application query builder has to change along with the data. Payload indexes are the part most often missed: a field used in a filter should have a payload index of the matching type (keyword, integer, float, bool, geo or datetime) created on the target collection, or filtered searches can be slow on large collections. Confirm the index types and their behavior in the Qdrant documentation for your version before you write the schema.

Joins are the change that needs the most design work. A pgvector query that joins an embeddings table to a documents, users or permissions table cannot run inside Qdrant. Each join has to be resolved in one of two places: in the application, by querying Postgres for the related rows after Qdrant returns IDs, or by denormalizing the needed values into the payload at write time. Denormalization is simpler for read speed but creates a copy that must be updated when the source row changes, so decide per field which system is the source of truth. Metadata types also need attention. Postgres jsonb and nested objects can be stored as nested payload JSON and filtered with dotted key paths, but arrays, timestamps stored as strings and numeric strings behave differently from typed columns, so normalize them before loading.

Before cutover, test filter selectivity and result counts. Run a sample of production filter combinations against both systems, compare the number of matching points with a count request against the SELECT count(*) result, and check that top-k results overlap for the same query vector. Watch for filters that match almost all or almost none of the points, because they change how the search engine chooses its path and can shift latency. Record the results so the cutover decision rests on evidence rather than on a single spot check.

How data and clients move during the pgvector to Qdrant cutover

The migration starts in the existing PostgreSQL database, where embeddings sit in pgvector columns beside the rows they describe. The Qdrant Migration Tool's pg subcommand reads that source through parallel workers and writes vectors and payload fields into a self-hosted Qdrant cluster. During the parallel run, the application sends the same test queries to pgvector and Qdrant and compares results before any client switches. Confirm that filters and recall match on both sides before you move the application endpoint.

Data flows from pgvector through the migration tool into Qdrant, with both stores compared before cutover.

What drives the cost and duration of a pgvector to Qdrant migration

This table lists the cost components of moving embeddings from pgvector to self-hosted Qdrant, who does each piece of work, and whether it is one-time or recurring. Read it to see which drivers would widen or narrow a scope before you ask for a quote. No duration is given here, because the timeline follows the written scope agreed before work starts.

Cost componentOne-time or recurringWhat drives it
Discovery and schema mappingOne-timeNumber of tables and collections, how many vector columns exist, and how relational columns map to Qdrant payload fields
Target design and sizingOne-timeVector count, dimensions, distance metric, and whether payload indexes are needed for the filters you run today
Migration runs and validationOne-timeVector count and dimensions, batch sizing and parallel workers, and how much recall and result checking you require before cutover
Filter and payload reworkOne-timeFilter complexity in SQL WHERE clauses, joins to relational data that must be denormalized or kept in PostgreSQL, and the number of query patterns
Application client changesOne-timeNumber of client applications and services that query pgvector today and must switch to the Qdrant client
Security setupOne-time, then recurring reviewAPI keys, TLS, network exposure rules, and access control for each application that connects to Qdrant, as Qdrant ships without authentication by default
Infrastructure and operationsRecurringStorage on block-level SSD or NVMe, RAM for the collection size, node count for a production cluster, and snapshot storage and retention
Parallel runOne-time, optionalWhether pgvector and Qdrant must serve the same queries side by side, and how long comparison results must be kept

What usually goes wrong when teams move embeddings out of Postgres

Teams moving embeddings from pgvector to Qdrant tend to hit the same few problems: search behavior changes, the new server is exposed or stored badly, and recovery plans do not match how Qdrant works. Each card below names one risk and the check that prevents it before cutover.

Filtered search slows without payload indexes

In pgvector, filters on ordinary columns run against indexed table data. In Qdrant, fields used in filters need payload indexes created on the target collection, or filtered searches can scan far more points than expected. Before the migration tool runs, list every field your application filters on, such as tenant, status or date, and create an index for each. Then time your top filtered queries on a copy of the data to confirm they perform as expected.

Qdrant installation docs

Recall differs after the move

Recall is the share of true nearest neighbors a search returns, and it can shift after a move even when the vectors are identical. Index parameters, search settings and the way filters combine with approximate search all differ between pgvector and Qdrant. Take a fixed set of test queries with known good results from pgvector, run them against Qdrant and compare the overlap of returned IDs before switching any application traffic.

Dimension or distance metric mismatch

A Qdrant collection fixes its vector size and distance metric when it is created. If the collection is created with a different dimension than the pgvector column, or with a metric such as cosine where the application expects inner product, the migration fails or results are quietly wrong. Read the vector dimension and operator class from the source table, create the target collection to match, and run a few known-answer queries to confirm the scores rank results as expected.

Default instance exposed without authentication

A self-deployed Qdrant instance listens on all network interfaces and has no authentication configured by default. A migration that starts a test server on a shared host can expose all migrated embeddings and payloads to anyone who can reach that port. Before loading data, bind the service to the private network, configure an API key, and confirm from a separate host that unauthenticated requests are rejected. Follow the security hardening steps before any production traffic.

Qdrant security docs

Storage on network file systems

Qdrant needs block-level storage with a POSIX-compatible file system and cannot run on network file systems such as NFS or on object storage such as S3. Teams that reuse an existing NFS volume from a Postgres host, or point a container at a bucket mount, can get slow writes or corrupted data during a large import. Provision local SSD or NVMe volumes for the Qdrant data directory, and confirm the file system type with the platform team before the first migration run.

Installation requirements

Snapshots that cannot restore to the target

Qdrant snapshots restore only to clusters running the same minor version or the next minor version. A backup taken on one release and restored after a later upgrade may fail at the moment recovery is needed most. Record the exact Qdrant version used for the migration, keep snapshots paired with that version, and test a restore into a separate cluster as part of cutover sign-off. Plan upgrades one minor version at a time.

Qdrant snapshots docs

Losing consistency with source tables

pgvector embeddings usually live in the same transactional rows as their source documents, so a row update and its embedding change together. Once copied into Qdrant, updates to Postgres no longer reach the vector store automatically. Decide which system is the record of truth, define how deletes and re-embeddings are synced, and run a count and sample comparison between the two stores after the final batch. Without this, stale vectors can return deleted content.

Questions teams ask before moving pgvector data to Qdrant

How much does it cost to move pgvector data to Qdrant?

The cost has three parts: the Qdrant engine itself, the infrastructure to run it, and the people who plan, migrate and verify the move. The open-source Qdrant engine is free to self-host under the Apache-2.0 license, according to the Qdrant GitHub repository and pricing page, so license cost is zero for self-hosting. Infrastructure is the recurring cost: compute, RAM and SSD or NVMe storage, plus backups and monitoring. Engineering effort is largely one-time. Ask any partner for a quote built from a written scope that lists the number of collections, total vector count, vector dimensions, payload size and the filters your application uses.

How long does a pgvector to Qdrant migration take?

Duration depends on the data volume, the number of collections, how many filtered fields must be rebuilt as payload indexes, and how much recall testing your team requires before cutover. The migration tool streams data in batches and can resume an interrupted run, so the copy itself is rarely the longest step. The longer work is usually sizing the target, validating search results against Postgres and switching clients. No duration is given here because none has been researched for this topic. Ask for a timeline tied to your own row counts and a test environment run before production.

What does the client team need to provide for the migration?

The work needs clear answers to a few questions and access to a few systems. Your team should provide:

  • Read access to the source Postgres database and the tables or columns that hold vectors and metadata
  • A target environment where Qdrant can run on block storage with a POSIX-compatible file system, since network file systems and object storage are not supported
  • A list of the queries your application runs, including filters on metadata
  • Owners for application client changes, API keys and network rules
  • A decision on who approves cutover and the rollback window

The Qdrant installation docs set the storage rules, so confirm them with the team that will host the cluster.

Can our own engineers run the pgvector to Qdrant migration without a partner?

Yes, a team with Postgres and container experience can run the Qdrant Migration Tool, which runs as a container or binary and supports pgvector as a source. The tool itself is not the hard part. The harder parts are designing collection settings for the vector size and distance metric, mapping SQL columns to payload fields, recreating filters as payload indexes, securing the new endpoint and proving search results match. A partner adds value mainly when the team lacks time, has many collections or needs the work documented for an audit. Your team can also use a partner for a bounded review of its plan.

When should pgvector stay in place instead of moving to Qdrant?

Keep pgvector when vector search is a small part of an application, the dataset is modest, and queries already join vectors with relational data that must stay consistent. Postgres with pgvector can be a sound choice in that case, and moving adds a second system to run. Consider Qdrant when vector search is central, when you need dedicated filtering and payload indexes at scale, or when you want a separate vector tier that can be sized and scaled on its own. Decide with measured latency, recall and operational load from your own workload, not from general claims.

How do we check recall after moving from pgvector to Qdrant?

Recall checking compares the nearest neighbors returned by Qdrant with the results your current pgvector queries return for the same query vectors and filters. Pick a representative set of queries, run both systems, and measure the overlap of top results at the cutoff your application uses. Repeat the check with the same filters, because a filter that differs between the two systems will look like a recall problem. Record vector counts, dimensions, distance metric and index settings alongside the results so a failed check can be traced. Set the acceptance threshold with your product and data owners before the test starts.

How do we keep Postgres as the system of record during and after the move?

Treat Postgres as the authoritative store and treat Qdrant as a derived search index that can be rebuilt from it. During migration, keep writes flowing to Postgres and sync changed embeddings and payload fields to Qdrant through a documented process. Record the last synced position so a resumed run does not miss or duplicate records. Compare counts and sample records between the two systems before cutover. After cutover, keep Postgres backups as your recovery source, and document how to re-create the Qdrant collection from Postgres if the cluster is lost. Confirm the sync mechanism with the team that owns the data pipeline.

What security settings does a new Qdrant endpoint need before we connect applications?

A self-hosted Qdrant instance is not secure by default. The Qdrant security docs state that new instances listen on all network interfaces and have no authentication configured. Before any application connects, your team should plan API keys, restricted network exposure, TLS for REST and gRPC and a review of access rules. Qdrant supports admin and read-only API keys, and JWT-based access control with per-collection permissions in later versions, so confirm which options fit your release. Audit logging of authenticated operations is also available in newer releases, according to the same docs.

How day-two operations change after leaving Postgres

Moving from pgvector to Qdrant changes who runs the vector store. Today the embeddings sit inside a PostgreSQL database that your team already backs up, patches, monitors and restores. After the move, your team owns a Qdrant node or cluster, its storage, its snapshots, its access keys and its upgrades. Qdrant is an open-source engine licensed under Apache-2.0, and the engine itself is free to self-host, but the operational work of running it falls to whoever deploys it. Qdrant Cloud, Hybrid Cloud and Private Cloud are separate paid options, and each is priced through Qdrant, so a quote for those is a different decision from the cost of the free engine.

Several day-two areas need an owner before cutover. Storage must be block-level with a POSIX-compatible file system, since Qdrant cannot run on NFS or object storage such as S3, and SSD or NVMe drives are recommended. Qdrant ships with no authentication and listens on all network interfaces by default, so API keys or JWT-based access control, TLS and network restrictions must be configured on day one. Audit logging of authenticated API operations is available in recent releases, and the team should confirm which version and settings they will use. Snapshots are tied to version rules: a snapshot restores only to a cluster on the same minor version or the next one, so the backup and upgrade runbooks must be written together. Confirm the exact limits in the Qdrant snapshots documentation before you set a retention policy.

Upgrades are the area most likely to surprise a team that came from Postgres, where minor patches are routine. Qdrant documents upgrades one minor version at a time, so your change calendar should plan each step rather than jumping releases. Ask your team to decide, before cutover, who receives release notices, where the staging copy of the collections lives, and how long a rollback would take. Ask a partner to quote the day-two work explicitly: operations, upgrades, key rotation, backup restore tests and on-call coverage. Those items recur after launch, and they are what separates the free engine from a supported service.

How DeployOpen scopes and delivers a pgvector to Qdrant migration

DeployOpen starts by agreeing in writing which pgvector tables, embedding columns, filters and client paths move to Qdrant and which stay in PostgreSQL. The work then runs in your infrastructure, with the migration tool, the Qdrant deployment and the cutover tested and documented before any application switches over.

How we scope

  • Inventory the pgvector tables, vector dimensions, distance settings and the SQL filters applications rely on today.
  • Agree in writing which collections, payload fields and payload indexes the Qdrant target will carry.
  • Confirm the target topology, storage class, authentication model and the engineers who will receive handover.

How we build

  • Deploy self-hosted Qdrant on infrastructure you control, with block storage and access controls set before any data moves.
  • Run the Qdrant Migration Tool's pg subcommand with agreed batch size and parallel workers, and record resume behavior.
  • Compare search results and recall between pgvector and Qdrant on a sample of real queries before cutover.

How we hand over

  • Deliver runbooks covering the migration commands, collection definitions, payload mapping and the cutover and rollback steps.
  • Document the filter translation from SQL predicates to Qdrant payload conditions, so application teams can review it.
  • Walk your platform and application teams through the final configuration and the operational checks they will own.

How we support

  • Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts.
  • Ongoing support, upgrades and continuous testing are available as a retainer after handover.
  • Confirm with your team which post-cutover support, monitoring and backup responsibilities sit in the retainer and which stay internal.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.