{"slug": "show-hn-postvec-switching-embedding-models-in-postgres-without-re-embedding", "title": "Show HN: Postvec – switching embedding models in Postgres without re-embedding", "summary": "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.", "body_md": "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.\n\nInference runs locally inside PostgreSQL or remote on [postvec-server](https://github.com/univec-ai/postvec/blob/main/postvec-server/README.md) or through hosted embedding APIs.\n\n```\ndocker run -d --name postvec -p 5432:5432 -e POSTGRES_PASSWORD=postvec \\\n  ghcr.io/univec-ai/postvec:pg18-local\n```\n\nWait until `docker inspect --format '{{.State.Health.Status}}' postvec` prints `healthy`. Then:\n\n```\nCREATE TABLE docs (id bigserial PRIMARY KEY, body text);\n\nSELECT postvec.enable(\n  'public.docs', 'body',\n  model => 'sentence-transformers-all-minilm-l6-v2'\n);\n\nINSERT INTO docs (body) VALUES\n  ('quarterly revenue guidance was raised'),\n  ('embedding model migration without source re-embedding');\n\n-- vectors fill after commit; wait until postvec.status() shows pending_jobs = 0\n\nSELECT d.*, s.rrf_score\n  FROM postvec.search('public.docs', 'body', 'switching vector models') AS s\n  JOIN docs AS d ON d.id = s.pk_value::bigint\n ORDER BY s.rrf_score DESC;\n```\n\nTo change the stored model:\n\n```\nSELECT postvec.migrate('public.docs', 'body', 'baai-bge-m3');\n```\n\nOld rows convert through an embedding-space translator. New writes use the new model. The columns swap at `migration_finalize()`.\n\n| Host | Start here | \n|---|---|\n| Try it | [Quick start](https://postvec.dev/docs/quickstart) (one container) or[quick start remote](https://postvec.dev/docs/quickstart-remote) | \n| Existing PostgreSQL 16, 17 or 18 | [Packages](https://postvec.dev/docs/install/packages) , then[`postvec setup`](https://postvec.dev/docs/install/setup) | \n| RDS, Aurora, Cloud SQL, Azure, Supabase, Neon | [Managed PostgreSQL](https://postvec.dev/docs/server/managed) | \n\nDownloads: [postvec.dev/download](https://postvec.dev/download). Docs: [postvec.dev/docs](https://postvec.dev/docs/).\n\n**Embedded** (`postvec.mode = 'embedded'`, default). The engine runs in the PostgreSQL process. Models live on local disk. The local image includes MiniLM (384-d).\n\n**Remote** (`postvec.mode = 'grpc'`). PostgreSQL sends work to [` postvec-server`](https://github.com/univec-ai/postvec/blob/main/postvec-server/README.md): GPU, process isolation, a fleet, or a host that cannot load a third-party `.so`. SQL is the same.\n\nHosted embedding APIs (OpenAI, Cohere, Bedrock, Gemini, Mistral, OpenRouter, UniVec) are optional per column. Keys live in `0600` files on the inference host. [Providers](https://postvec.dev/docs/models/providers).\n\nThe extension, CLI, engine, providers and packaging use the PostgreSQL License.\n\n`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](https://univec.ai). Each version converts to the PostgreSQL License four years after release. [LICENSING.md](https://github.com/univec-ai/postvec/blob/main/LICENSING.md).\n\n```\ncargo build --workspace                 # CLI, server, engine\ncd postvec && cargo pgrx test pg18      # extension tests\ncd postvec && ./ci.sh                   # full local gate\n```\n\nNeeds Rust, cargo-pgrx 0.18.1, a pgrx-managed PostgreSQL 18 with pgvector, and protoc. [Contributing](https://github.com/univec-ai/postvec/blob/main/CONTRIBUTING.md).", "url": "https://wpnews.pro/news/show-hn-postvec-switching-embedding-models-in-postgres-without-re-embedding", "canonical_source": "https://github.com/univec-ai/postvec/", "published_at": "2026-11-24 13:27:54+00:00", "updated_at": "2026-11-24 13:42:07.172589+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "ai-infrastructure", "large-language-models"], "entities": ["Postvec", "Univec AI", "PostgreSQL", "postvec-server", "MiniLM", "pgvector", "Business Source License 1.1", "OpenAI"], "also_reported_by": [], "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.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/show-hn-postvec-switching-embedding-models-in-postgres-without-re-embedding", "markdown": "https://wpnews.pro/news/show-hn-postvec-switching-embedding-models-in-postgres-without-re-embedding.md", "text": "https://wpnews.pro/news/show-hn-postvec-switching-embedding-models-in-postgres-without-re-embedding.txt", "jsonld": "https://wpnews.pro/news/show-hn-postvec-switching-embedding-models-in-postgres-without-re-embedding.jsonld"}}