Databases & HA

pg_pinecone vs pgvector: Open-Source Vector Search in Postgres Compared

What pg_pinecone is, how its native index differs from pgvector HNSW, what Pinecone's own benchmarks show, and how to test it on your data before you switch.

By EpiFive Editorial TeamReviewed/updated 11 min readHow we check our guides
On this page

pg_pinecone is an open-source Postgres extension from Pinecone that adds a different kind of vector index to tables you already query with pgvector. Pinecone's benchmark shows a much smaller index and lower unfiltered latency than pgvector HNSW, but the results are vendor-run on one dataset, so the practical answer is to keep pgvector as your baseline and test pg_pinecone on a copy of your own data.

Who this is for

This guide is for developers and database administrators who already store embeddings in PostgreSQL, or are about to, and want to know whether a new extension is worth a trial. By the end you will know what pg_pinecone does, how it differs from pgvector, which of Pinecone's claims are documented and which are not yet independently confirmed, how to install it in a throwaway Docker container, and how to run a fair comparison on your own table.

It does not cover choosing between Postgres and a dedicated vector database from scratch. For that, see pgvector vs Azure AI Search vs Qdrant. For pgvector index tuning itself, see pgvector on PostgreSQL: setup, HNSW vs IVFFlat and tuning.

What pg_pinecone is

According to Pinecone's introduction post (dated October 27, 2026) and the GitHub README, pg_pinecone is an Apache 2.0 licensed extension that brings Pinecone's search engine into Postgres. You keep your tables and your pgvector queries (ORDER BY embedding <=> '[...]' LIMIT n) and choose a search engine per table. There are three engines:

EngineWhere search runsNeeds a Pinecone account?
native (default)Inside Postgres, using Pinecone's engineNo account, API key or network calls
pgvectorInside Postgres, using pgvector's HNSW or IVFFlat indexNo
remoteIn a Pinecone serverless index; Postgres keeps every rowYes, API key required

Switching engines is one call to pinecone.set_engine(), and queries stay the same, according to the announcement. The README also describes BM25, vector and hybrid full-text search from SQL, but the comparison page says BM25 goes through a Pinecone index and needs an API key, so this article stays on vector search.

How the native index differs from HNSW

pgvector's HNSW index is a graph: the announcement says it "stores a full copy of every vector plus links to its nearest neighbors." The native engine instead uses IVF clusters with RaBitQ codes, about one bit per dimension plus correction values. A search probes the nearest clusters, estimates distances from the compact codes, then reranks the candidates using the full vectors from the table. Because the index holds codes rather than full vector copies, it can be much smaller.

Two behaviors matter for planning:

  • Filtering. pgvector applies a WHERE filter after it scans an approximate index, so a narrow filter can return fewer rows than your LIMIT. The pgvector README gives an example: with the default hnsw.ef_search of 40 and a condition matching 10% of rows, about 4 rows come back on average. pg_pinecone's native engine filters during the search. Per the announcement, filters matching 3% of rows or fewer (the default threshold) use pre-filtering with exact results, and wider filters use single-stage filtering that searches up to half the clusters. The comparison page adds that native filtering handles one equals column during the search and checks other conditions per batch.
  • Data changes. New rows are assigned to the nearest cluster and are searchable immediately, but the centroids stay where the build placed them. After a large change, such as a bulk load that doubles the table, Pinecone says to run REINDEX or enable automatic maintenance to rebalance.

Requirements and limits to check first

From the README and the comparison page, checked 2026-11-21:

  • PostgreSQL 17 or 18 only. pgvector itself supports Postgres 13 and later, so older servers cannot use pg_pinecone.
  • Superuser access is needed for setup, and pgvector must be installed on the server.
  • Pinecone's comparison page describes it as self-managed and not available on Amazon RDS. Confirm against your own managed provider's list of supported extensions.
  • Dimension width for the native index is capped by the Postgres page format (the comparison page gives no number). pgvector's own indexing limits are documented: 2,000 dimensions for vector, 4,000 for halfvec.
  • The remote engine's full-text results include IDs and scores for rows hidden by row-level security, visible to anyone with SELECT on the table, according to the comparison page.
  • Pinecone calls this a first release with an evolving roadmap, and the comparison page notes the published benchmark runs predate pg_pinecone 0.11.0.

Install pg_pinecone in a throwaway container

The README lists a prebuilt release, a Postgres.app package (PostgreSQL 18, Apple silicon), a Docker image, PGXN and a build from source. For a trial, Docker is the least invasive. The image pineconeteam/pg_pinecone is based on pgvector/pgvector and has tags pg17, pg18 and latest (Postgres 18). The README's example is:

docker run -d -e POSTGRES_PASSWORD=secret pineconeteam/pg_pinecone:pg17

Add -c shared_preload_libraries=pg_pinecone if you want to try the remote engine. Do not use the example password anywhere real. The README says release artifacts carry GitHub build-provenance attestations and the Docker images are signed with cosign, which you can verify before using them beyond a trial.

Connect with psql and run the README's quick start:

CREATE EXTENSION vector;
CREATE EXTENSION pg_pinecone;
 
CREATE TABLE items (id bigint PRIMARY KEY, embedding vector(3));
INSERT INTO items VALUES (1, '[1,2,3]'), (2, '[4,5,6]'), (3, '[7,8,9]');
 
-- Builds a native index. No API key or network access needed.
SELECT pinecone.create_index('items', 'embedding');
 
SELECT id FROM items ORDER BY embedding <=> '[1,2,4]' LIMIT 2;

The same query syntax you use with pgvector works; only the index creation call differs. The README does not document an expected result set for this snippet, so check that it returns two rows and that nothing errors.

What the benchmarks say, and what they do not

Pinecone published its numbers in the introduction post and on its comparison page at pinecone.io/compare/pgvector. Everything below is Pinecone's own measurement, not an independent result.

Setup. The dataset is wiki_dpr, 1 million vectors of 768 dimensions with Euclidean distance, 500 held-out queries, top 10 results, on one AWS r6id.4xlarge (16 vCPUs, 128 GB RAM). Unfiltered, build and size runs used Postgres 17.11 with pgvector 0.8.7; filtered runs used Postgres 18.6 with pg_pinecone 0.10.0. pgvector HNSW used m=16, with ef_search swept per recall level and iterative scans in relaxed order for filtered queries. The baseline is HNSW over halfvec, the faster pgvector variant. One client, no concurrent writes.

Metricpg_pinecone nativepgvector HNSW (halfvec)pgvector HNSW (full-size)
Unfiltered median latency, recall 0.951.27 ms1.71 ms2.67 ms
Unfiltered median latency, recall 0.992.28 ms4.65 ms6.72 ms
1% filter0.981 recall, 8.3 ms0.924 recall, 56 msdid not reach 0.95 recall at ef_search 40-160
10% filter1.000 recall, 12.3 ms0.922 recall, 5.1 msnot reported
Build time45 s62 s79 s (announcement)
Index size136 MB2.0 GB4.1 GB
Total footprint (table + index)4.3 GB3.7 GBnot reported

Reading it fairly:

  • The index is about 15 times smaller (2.0 GB is about 2,048 MB, divided by 136 MB is about 15.1), but the total footprint is larger: 4.3 GB against 3.7 GB, about 16% more, because pg_pinecone keeps full-size vectors in the table while the halfvec baseline stores half-precision ones.
  • Unfiltered latency is 1.35 times lower at 0.95 recall (1.71 / 1.27) and about 2.0 times lower at 0.99 recall (4.65 / 2.28).
  • Peak build memory is higher for pg_pinecone: about 7.9 GB against about 5.4 GB, per the comparison page.
  • The pgvector baseline won at a 10% filter (5.1 ms against 12.3 ms) and for queries filtering from inside the filtered group. The announcement text and chart differ slightly on the 10% HNSW figure (0.920 recall in 5.9 ms in the text, 0.922 and 5.1 ms in the chart); this article uses the chart values.
  • Under a 4 GB memory cap, pg_pinecone was within 3% of uncapped latency once the cache warmed, but the first pass was 1.9 times slower.
  • Pinecone itself says graph indexes "perform well at static unfiltered high QPS workloads," a case the native design does not target, and that the benchmarks cover one dataset and mostly one client. It also notes it has not published recall at each filter selectivity level.

On 2026-11-21 we found no independent benchmark of pg_pinecone. The repository includes a bench folder with the harness, so you can rerun it, but it is still Pinecone's code.

When each option makes sense

SituationLeaning
Managed Postgres where pg_pinecone is not on the extension listpgvector
Postgres 13-16 and you cannot upgrade soonpgvector
Memory pressure from a large HNSW index, self-managed PG 17/18Worth testing pg_pinecone native
Queries with narrow filters (around 1% of rows) where HNSW returns too few rowsWorth testing pg_pinecone native, or pgvector with iterative scans
Static data, unfiltered, very high queries per secondpgvector HNSW stays a strong baseline
Need to scale past one Postgres serverPinecone's own managed database, or the remote engine, with its async sync lag

Before you reach for a new extension, try pgvector's built-in fixes for filtered queries. The README documents SET hnsw.iterative_scan = strict_order; (or relaxed_order for better recall with slightly out-of-order results), and ivfflat.iterative_scan for IVFFlat.

Run your own comparison

Use a copy of production data, not the quick start table.

  1. Copy the table to a test instance on PostgreSQL 17 or 18 with both extensions installed.
  2. Build a pgvector baseline: an HNSW index with the operator class that matches your distance operator, for example CREATE INDEX ON items USING hnsw (embedding vector_cosine_ops);. Record build time and index size with pg_relation_size.
  3. Measure recall against exact search: run each query without an index (or with index scans disabled) to get the true top 10, then compute the overlap with the indexed result.
  4. Measure latency at the recall you need, using your real filters, your real LIMIT and your real concurrency, including writes if your workload has them. Pinecone's runs did not include concurrent writes.
  5. Create the native index with pinecone.create_index('items', 'embedding') and repeat steps 3 and 4. Use pinecone.set_engine() to switch engines on the same table, as the announcement describes.
  6. Test change handling: insert a large batch, check recall again, then run REINDEX and check again.
  7. Compare memory and total disk (table plus index), not index size alone.

Troubleshooting

  • CREATE EXTENSION pg_pinecone fails because the extension is not available. The files are not in the Postgres installation, or the server is not PostgreSQL 17 or 18. Use the Docker image or install the matching release archive. We did not run the install in this check, so confirm the exact message on your system.
  • The remote engine does not start. The README says the Docker setup needs shared_preload_libraries=pg_pinecone, and remote search needs a Pinecone API key.
  • A filtered pgvector query returns fewer rows than LIMIT. That is the post-filter behavior described above. Raise hnsw.ef_search, enable iterative scans, or add a normal index on the filter column.
  • Recall drops after a bulk load on the native engine. The centroids are fixed from the build; run REINDEX as Pinecone advises.

See also

What we checked

  • Opened the pg_pinecone GitHub README on 2026-11-21: Apache 2.0 license, PostgreSQL 17 or 18, superuser and pgvector required, the three engines, the Docker image tags and the quick start SQL shown above.
  • Opened Pinecone's "Introducing pg_pinecone" post (dated 2026-10-27) on 2026-11-21 and copied its benchmark setup, engine descriptions, filter thresholds and sync behavior.
  • Cross-checked the benchmark table against Pinecone's pgvector comparison page (its pgvector claims were last checked by Pinecone on 2026-10-30); the two agree except for the small 10% filter discrepancy noted above.
  • Opened the pgvector README on 2026-11-21: 10% filter example with hnsw.ef_search default 40, hnsw.iterative_scan options, index dimension limits, and the HNSW and IVFFlat CREATE INDEX statements.
  • Recalculated: 2.0 GB x 1,024 = 2,048 MB, divided by 136 MB = 15.06; 4.3 / 3.7 = 1.162; 1.71 / 1.27 = 1.35; 4.65 / 2.28 = 2.04.
  • Searched for an independent pg_pinecone benchmark on 2026-11-21 and found only Pinecone's material and secondary coverage.
  • Not checked: we did not install pg_pinecone, run any SQL or reproduce any benchmark; all commands are quoted from the README and the steps in the test plan follow the vendor documentation.

Last tested: 2026-11-21

References

Questions people ask

What is pg_pinecone?

pg_pinecone is an open-source (Apache 2.0) Postgres extension released by Pinecone on October 27, 2026. It adds a search engine to tables that already hold pgvector columns. The default native engine runs inside Postgres with no Pinecone account, API key or network calls.

Is pg_pinecone a replacement for pgvector?

No. The README says pgvector must be installed on the server, and pg_pinecone can use pgvector's own HNSW or IVFFlat index as one of its engines. It is an additional index option on top of your pgvector data, not a different storage format.

Is pg_pinecone faster than pgvector?

In Pinecone's own benchmark on 1 million 768-dimension vectors, the native engine had lower unfiltered latency than pgvector HNSW and a much smaller index, but pgvector was faster at a 10 percent filter. The benchmark is vendor-run, single-client and on one dataset, so test your own data.

Can I use pg_pinecone on Amazon RDS or other managed Postgres?

Pinecone's comparison page describes pg_pinecone as self-managed PostgreSQL 17 or 18 with superuser access and says it is not available on Amazon RDS. Check your provider's extension list before planning around it.

PostgreSQLpgvectorpg_pineconePineconeVector Search