cd /news/ai-tools/show-hn-postvec-switching-embedding-… · home › topics › ai-tools › article
[ARTICLE · art-175417] src=github.com ↗ pub= topic=ai-tools verified=true sentiment=↑ positive

Show HN: Postvec – switching embedding models in Postgres without re-embedding

Univec AI released Postvec, a PostgreSQL extension that fuses BM25 and semantic search in a single SQL call and migrates stored vectors to a new embedding model without re-embedding the source text. The extension converts old rows through an embedding-space translator, applies the new model to new writes, and swaps columns at migration_finalize(); it runs embedded in the PostgreSQL process with MiniLM (384-d) in the local image, remotely via postvec-server over gRPC, or through hosted APIs including OpenAI, Cohere, Bedrock, Gemini, Mistral, OpenRouter and UniVec. The extension, CLI, engine, providers and packaging use the PostgreSQL License, while postvec-server uses Business Source License 1.1, converting to the PostgreSQL License four years after each release and requiring postvec Pro for organizational production use beyond a 30-day evaluation.

key takeaway

Postvec's postvec.migrate() converts existing rows to a new embedding model through an embedding-space translator while new writes use the new model, with columns swapped at migration_finalize(), so teams can switch models without re-embedding source text.

read2 min views1 publishedNov 24, 2026
Show HN: Postvec – switching embedding models in Postgres without re-embedding
Image: Michielbdejong (auto-discovered)

Postvec is an extension for fused hybrid search: it combines BM25 and semantic search in one SQL call and keeps vectors in sync with your text automatically. You can also use it to migrate vectors without re-embedding of text with direct conversion between embedding formats.

Inference runs locally inside PostgreSQL or remote on postvec-server or through hosted embedding APIs.

docker run -d --name postvec -p 5432:5432 -e POSTGRES_PASSWORD=postvec \
  ghcr.io/univec-ai/postvec:pg18-local

Wait until docker inspect --format '{{.State.Health.Status}}' postvec prints healthy. Then:

CREATE TABLE docs (id bigserial PRIMARY KEY, body text);

SELECT postvec.enable(
  'public.docs', 'body',
  model => 'sentence-transformers-all-minilm-l6-v2'
);

INSERT INTO docs (body) VALUES
  ('quarterly revenue guidance was raised'),
  ('embedding model migration without source re-embedding');

-- vectors fill after commit; wait until postvec.status() shows pending_jobs = 0

SELECT d.*, s.rrf_score
  FROM postvec.search('public.docs', 'body', 'switching vector models') AS s
  JOIN docs AS d ON d.id = s.pk_value::bigint
 ORDER BY s.rrf_score DESC;

To change the stored model:

SELECT postvec.migrate('public.docs', 'body', 'baai-bge-m3');

Old rows convert through an embedding-space translator. New writes use the new model. The columns swap at migration_finalize().

Host Start here
Try it Quick start (one container) orquick start remote
Existing PostgreSQL 16, 17 or 18 Packages , thenpostvec setup
RDS, Aurora, Cloud SQL, Azure, Supabase, Neon Managed PostgreSQL

Downloads: postvec.dev/download. Docs: postvec.dev/docs.

Embedded (postvec.mode = 'embedded', default). The engine runs in the PostgreSQL process. Models live on local disk. The local image includes MiniLM (384-d).

Remote (postvec.mode = 'grpc'). PostgreSQL sends work to postvec-server: GPU, process isolation, a fleet, or a host that cannot load a third-party .so. SQL is the same.

Hosted embedding APIs (OpenAI, Cohere, Bedrock, Gemini, Mistral, OpenRouter, UniVec) are optional per column. Keys live in 0600 files on the inference host. Providers.

The extension, CLI, engine, providers and packaging use the PostgreSQL License.

postvec-server uses Business Source License 1.1 (source-available). Development, testing, personal production and one 30-day production evaluation per organization are free. Organizational production use needs postvec Pro. Each version converts to the PostgreSQL License four years after release. LICENSING.md.

cargo build --workspace                 # CLI, server, engine
cd postvec && cargo pgrx test pg18      # extension tests
cd postvec && ./ci.sh                   # full local gate

Needs Rust, cargo-pgrx 0.18.1, a pgrx-managed PostgreSQL 18 with pgvector, and protoc. Contributing.

── more in #ai-tools 4 stories · sorted by recency
── more on @postvec 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/show-hn-postvec-swit…] indexed:0 read:2min 2026-11-24 · —