vectorize

vectorize

pg_vectorize : The simplest way to do vector search on Postgres

Overview

ID Extension Package Version Category License Language
1830
vectorize
pg_vectorize
0.26.0
RAG
PostgreSQL
Rust
Attribute Has Binary Has Library Need Load Has DDL Relocatable Trusted
--s-d--
No
Yes
No
Yes
no
no
Relationships
Schemas vectorize
Requires
pg_cron
pgmq
vector
See Also
vchord
vectorscale
pg_summarize
pg_tiktoken
pg4ml
pgml
pg_later
pg_similarity

Packages

Type Repo Version PG Major Compatibility Package Pattern Dependencies
EXT
PIGSTY
0.26.0
18
17
16
15
14
pg_vectorize pg_cron, pgmq, vector
RPM
PIGSTY
0.26.0
18
17
16
15
14
pg_vectorize_$v pgmq_$v, pg_cron_$v, pgvector_$v
DEB
PIGSTY
0.26.0
18
17
16
15
14
postgresql-$v-pg-vectorize postgresql-$v-pgmq, postgresql-$v-pg-cron, postgresql-$v-pgvector
Linux / PG PG18 PG17 PG16 PG15 PG14
el8.x86_64
PIGSTY 0.26.0
PIGSTY 0.26.0
PIGSTY 0.26.0
PIGSTY 0.26.0
PIGSTY 0.26.0
el8.aarch64
PIGSTY 0.26.0
PIGSTY 0.26.0
PIGSTY 0.26.0
PIGSTY 0.26.0
PIGSTY 0.26.0
el9.x86_64
PIGSTY 0.26.0
PIGSTY 0.26.0
PIGSTY 0.26.0
PIGSTY 0.26.0
PIGSTY 0.26.0
el9.aarch64
PIGSTY 0.26.0
PIGSTY 0.26.0
PIGSTY 0.26.0
PIGSTY 0.26.0
PIGSTY 0.26.0
el10.x86_64
PIGSTY 0.26.0
PIGSTY 0.26.0
PIGSTY 0.26.0
PIGSTY 0.26.0
PIGSTY 0.26.0
el10.aarch64
PIGSTY 0.26.0
PIGSTY 0.26.0
PIGSTY 0.26.0
PIGSTY 0.26.0
PIGSTY 0.26.0
d12.x86_64
PIGSTY 0.26.0
PIGSTY 0.26.0
PIGSTY 0.26.0
PIGSTY 0.26.0
PIGSTY 0.26.0
d12.aarch64
PIGSTY 0.26.0
PIGSTY 0.26.0
PIGSTY 0.26.0
PIGSTY 0.26.0
PIGSTY 0.26.0
d13.x86_64
PIGSTY 0.26.0
PIGSTY 0.26.0
PIGSTY 0.26.0
PIGSTY 0.26.0
PIGSTY 0.26.0
d13.aarch64
PIGSTY 0.26.0
PIGSTY 0.26.0
PIGSTY 0.26.0
PIGSTY 0.26.0
PIGSTY 0.26.0
u22.x86_64
PIGSTY 0.26.0
PIGSTY 0.26.0
PIGSTY 0.26.0
PIGSTY 0.26.0
PIGSTY 0.26.0
u22.aarch64
PIGSTY 0.26.0
PIGSTY 0.26.0
PIGSTY 0.26.0
PIGSTY 0.26.0
PIGSTY 0.26.0
u24.x86_64
PIGSTY 0.26.0
PIGSTY 0.26.0
PIGSTY 0.26.0
PIGSTY 0.26.0
PIGSTY 0.26.0
u24.aarch64
PIGSTY 0.26.0
PIGSTY 0.26.0
PIGSTY 0.26.0
PIGSTY 0.26.0
PIGSTY 0.26.0
Package Version OS ORG SIZE File URL
pg_vectorize_18 0.26.0 el8.x86_64 pigsty 7.3 MiB pg_vectorize_18-0.26.0-1PIGSTY.el8.x86_64.rpm
pg_vectorize_18 0.26.0 el8.aarch64 pigsty 6.9 MiB pg_vectorize_18-0.26.0-1PIGSTY.el8.aarch64.rpm
pg_vectorize_18 0.26.0 el9.x86_64 pigsty 7.0 MiB pg_vectorize_18-0.26.0-1PIGSTY.el9.x86_64.rpm
pg_vectorize_18 0.26.0 el9.aarch64 pigsty 6.7 MiB pg_vectorize_18-0.26.0-1PIGSTY.el9.aarch64.rpm
pg_vectorize_18 0.26.0 el10.x86_64 pigsty 7.0 MiB pg_vectorize_18-0.26.0-1PIGSTY.el10.x86_64.rpm
pg_vectorize_18 0.26.0 el10.aarch64 pigsty 7.4 MiB pg_vectorize_18-0.26.0-1PIGSTY.el10.aarch64.rpm
postgresql-18-pg-vectorize 0.26.0 d12.x86_64 pigsty 6.0 MiB postgresql-18-pg-vectorize_0.26.0-1PIGSTY~bookworm_amd64.deb
postgresql-18-pg-vectorize 0.26.0 d12.aarch64 pigsty 5.6 MiB postgresql-18-pg-vectorize_0.26.0-1PIGSTY~bookworm_arm64.deb
postgresql-18-pg-vectorize 0.26.0 d13.x86_64 pigsty 6.0 MiB postgresql-18-pg-vectorize_0.26.0-1PIGSTY~trixie_amd64.deb
postgresql-18-pg-vectorize 0.26.0 d13.aarch64 pigsty 5.6 MiB postgresql-18-pg-vectorize_0.26.0-1PIGSTY~trixie_arm64.deb
postgresql-18-pg-vectorize 0.26.0 u22.x86_64 pigsty 6.8 MiB postgresql-18-pg-vectorize_0.26.0-1PIGSTY~jammy_amd64.deb
postgresql-18-pg-vectorize 0.26.0 u22.aarch64 pigsty 6.4 MiB postgresql-18-pg-vectorize_0.26.0-1PIGSTY~jammy_arm64.deb
postgresql-18-pg-vectorize 0.26.0 u24.x86_64 pigsty 6.7 MiB postgresql-18-pg-vectorize_0.26.0-1PIGSTY~noble_amd64.deb
postgresql-18-pg-vectorize 0.26.0 u24.aarch64 pigsty 6.4 MiB postgresql-18-pg-vectorize_0.26.0-1PIGSTY~noble_arm64.deb
Package Version OS ORG SIZE File URL
pg_vectorize_17 0.26.0 el8.x86_64 pigsty 7.3 MiB pg_vectorize_17-0.26.0-1PIGSTY.el8.x86_64.rpm
pg_vectorize_17 0.26.0 el8.aarch64 pigsty 6.9 MiB pg_vectorize_17-0.26.0-1PIGSTY.el8.aarch64.rpm
pg_vectorize_17 0.26.0 el9.x86_64 pigsty 7.0 MiB pg_vectorize_17-0.26.0-1PIGSTY.el9.x86_64.rpm
pg_vectorize_17 0.26.0 el9.aarch64 pigsty 6.7 MiB pg_vectorize_17-0.26.0-1PIGSTY.el9.aarch64.rpm
pg_vectorize_17 0.26.0 el10.x86_64 pigsty 7.0 MiB pg_vectorize_17-0.26.0-1PIGSTY.el10.x86_64.rpm
pg_vectorize_17 0.26.0 el10.aarch64 pigsty 7.4 MiB pg_vectorize_17-0.26.0-1PIGSTY.el10.aarch64.rpm
postgresql-17-pg-vectorize 0.26.0 d12.x86_64 pigsty 6.0 MiB postgresql-17-pg-vectorize_0.26.0-1PIGSTY~bookworm_amd64.deb
postgresql-17-pg-vectorize 0.26.0 d12.aarch64 pigsty 5.6 MiB postgresql-17-pg-vectorize_0.26.0-1PIGSTY~bookworm_arm64.deb
postgresql-17-pg-vectorize 0.26.0 d13.x86_64 pigsty 6.0 MiB postgresql-17-pg-vectorize_0.26.0-1PIGSTY~trixie_amd64.deb
postgresql-17-pg-vectorize 0.26.0 d13.aarch64 pigsty 5.6 MiB postgresql-17-pg-vectorize_0.26.0-1PIGSTY~trixie_arm64.deb
postgresql-17-pg-vectorize 0.26.0 u22.x86_64 pigsty 6.8 MiB postgresql-17-pg-vectorize_0.26.0-1PIGSTY~jammy_amd64.deb
postgresql-17-pg-vectorize 0.26.0 u22.aarch64 pigsty 6.5 MiB postgresql-17-pg-vectorize_0.26.0-1PIGSTY~jammy_arm64.deb
postgresql-17-pg-vectorize 0.26.0 u24.x86_64 pigsty 6.7 MiB postgresql-17-pg-vectorize_0.26.0-1PIGSTY~noble_amd64.deb
postgresql-17-pg-vectorize 0.26.0 u24.aarch64 pigsty 6.4 MiB postgresql-17-pg-vectorize_0.26.0-1PIGSTY~noble_arm64.deb
Package Version OS ORG SIZE File URL
pg_vectorize_16 0.26.0 el8.x86_64 pigsty 7.3 MiB pg_vectorize_16-0.26.0-1PIGSTY.el8.x86_64.rpm
pg_vectorize_16 0.26.0 el8.aarch64 pigsty 6.9 MiB pg_vectorize_16-0.26.0-1PIGSTY.el8.aarch64.rpm
pg_vectorize_16 0.26.0 el9.x86_64 pigsty 7.0 MiB pg_vectorize_16-0.26.0-1PIGSTY.el9.x86_64.rpm
pg_vectorize_16 0.26.0 el9.aarch64 pigsty 6.7 MiB pg_vectorize_16-0.26.0-1PIGSTY.el9.aarch64.rpm
pg_vectorize_16 0.26.0 el10.x86_64 pigsty 7.0 MiB pg_vectorize_16-0.26.0-1PIGSTY.el10.x86_64.rpm
pg_vectorize_16 0.26.0 el10.aarch64 pigsty 7.4 MiB pg_vectorize_16-0.26.0-1PIGSTY.el10.aarch64.rpm
postgresql-16-pg-vectorize 0.26.0 d12.x86_64 pigsty 6.0 MiB postgresql-16-pg-vectorize_0.26.0-1PIGSTY~bookworm_amd64.deb
postgresql-16-pg-vectorize 0.26.0 d12.aarch64 pigsty 5.6 MiB postgresql-16-pg-vectorize_0.26.0-1PIGSTY~bookworm_arm64.deb
postgresql-16-pg-vectorize 0.26.0 d13.x86_64 pigsty 6.0 MiB postgresql-16-pg-vectorize_0.26.0-1PIGSTY~trixie_amd64.deb
postgresql-16-pg-vectorize 0.26.0 d13.aarch64 pigsty 5.6 MiB postgresql-16-pg-vectorize_0.26.0-1PIGSTY~trixie_arm64.deb
postgresql-16-pg-vectorize 0.26.0 u22.x86_64 pigsty 6.8 MiB postgresql-16-pg-vectorize_0.26.0-1PIGSTY~jammy_amd64.deb
postgresql-16-pg-vectorize 0.26.0 u22.aarch64 pigsty 6.4 MiB postgresql-16-pg-vectorize_0.26.0-1PIGSTY~jammy_arm64.deb
postgresql-16-pg-vectorize 0.26.0 u24.x86_64 pigsty 6.7 MiB postgresql-16-pg-vectorize_0.26.0-1PIGSTY~noble_amd64.deb
postgresql-16-pg-vectorize 0.26.0 u24.aarch64 pigsty 6.4 MiB postgresql-16-pg-vectorize_0.26.0-1PIGSTY~noble_arm64.deb
Package Version OS ORG SIZE File URL
pg_vectorize_15 0.26.0 el8.x86_64 pigsty 7.3 MiB pg_vectorize_15-0.26.0-1PIGSTY.el8.x86_64.rpm
pg_vectorize_15 0.26.0 el8.aarch64 pigsty 6.9 MiB pg_vectorize_15-0.26.0-1PIGSTY.el8.aarch64.rpm
pg_vectorize_15 0.26.0 el9.x86_64 pigsty 7.0 MiB pg_vectorize_15-0.26.0-1PIGSTY.el9.x86_64.rpm
pg_vectorize_15 0.26.0 el9.aarch64 pigsty 6.7 MiB pg_vectorize_15-0.26.0-1PIGSTY.el9.aarch64.rpm
pg_vectorize_15 0.26.0 el10.x86_64 pigsty 7.0 MiB pg_vectorize_15-0.26.0-1PIGSTY.el10.x86_64.rpm
pg_vectorize_15 0.26.0 el10.aarch64 pigsty 7.4 MiB pg_vectorize_15-0.26.0-1PIGSTY.el10.aarch64.rpm
postgresql-15-pg-vectorize 0.26.0 d12.x86_64 pigsty 6.0 MiB postgresql-15-pg-vectorize_0.26.0-1PIGSTY~bookworm_amd64.deb
postgresql-15-pg-vectorize 0.26.0 d12.aarch64 pigsty 5.6 MiB postgresql-15-pg-vectorize_0.26.0-1PIGSTY~bookworm_arm64.deb
postgresql-15-pg-vectorize 0.26.0 d13.x86_64 pigsty 6.0 MiB postgresql-15-pg-vectorize_0.26.0-1PIGSTY~trixie_amd64.deb
postgresql-15-pg-vectorize 0.26.0 d13.aarch64 pigsty 5.6 MiB postgresql-15-pg-vectorize_0.26.0-1PIGSTY~trixie_arm64.deb
postgresql-15-pg-vectorize 0.26.0 u22.x86_64 pigsty 6.8 MiB postgresql-15-pg-vectorize_0.26.0-1PIGSTY~jammy_amd64.deb
postgresql-15-pg-vectorize 0.26.0 u22.aarch64 pigsty 6.5 MiB postgresql-15-pg-vectorize_0.26.0-1PIGSTY~jammy_arm64.deb
postgresql-15-pg-vectorize 0.26.0 u24.x86_64 pigsty 6.7 MiB postgresql-15-pg-vectorize_0.26.0-1PIGSTY~noble_amd64.deb
postgresql-15-pg-vectorize 0.26.0 u24.aarch64 pigsty 6.4 MiB postgresql-15-pg-vectorize_0.26.0-1PIGSTY~noble_arm64.deb
Package Version OS ORG SIZE File URL
pg_vectorize_14 0.26.0 el8.x86_64 pigsty 7.3 MiB pg_vectorize_14-0.26.0-1PIGSTY.el8.x86_64.rpm
pg_vectorize_14 0.26.0 el8.aarch64 pigsty 6.9 MiB pg_vectorize_14-0.26.0-1PIGSTY.el8.aarch64.rpm
pg_vectorize_14 0.26.0 el9.x86_64 pigsty 7.0 MiB pg_vectorize_14-0.26.0-1PIGSTY.el9.x86_64.rpm
pg_vectorize_14 0.26.0 el9.aarch64 pigsty 6.7 MiB pg_vectorize_14-0.26.0-1PIGSTY.el9.aarch64.rpm
pg_vectorize_14 0.26.0 el10.x86_64 pigsty 7.0 MiB pg_vectorize_14-0.26.0-1PIGSTY.el10.x86_64.rpm
pg_vectorize_14 0.26.0 el10.aarch64 pigsty 7.4 MiB pg_vectorize_14-0.26.0-1PIGSTY.el10.aarch64.rpm
postgresql-14-pg-vectorize 0.26.0 d12.x86_64 pigsty 6.0 MiB postgresql-14-pg-vectorize_0.26.0-1PIGSTY~bookworm_amd64.deb
postgresql-14-pg-vectorize 0.26.0 d12.aarch64 pigsty 5.6 MiB postgresql-14-pg-vectorize_0.26.0-1PIGSTY~bookworm_arm64.deb
postgresql-14-pg-vectorize 0.26.0 d13.x86_64 pigsty 6.0 MiB postgresql-14-pg-vectorize_0.26.0-1PIGSTY~trixie_amd64.deb
postgresql-14-pg-vectorize 0.26.0 d13.aarch64 pigsty 5.6 MiB postgresql-14-pg-vectorize_0.26.0-1PIGSTY~trixie_arm64.deb
postgresql-14-pg-vectorize 0.26.0 u22.x86_64 pigsty 6.8 MiB postgresql-14-pg-vectorize_0.26.0-1PIGSTY~jammy_amd64.deb
postgresql-14-pg-vectorize 0.26.0 u22.aarch64 pigsty 6.4 MiB postgresql-14-pg-vectorize_0.26.0-1PIGSTY~jammy_arm64.deb
postgresql-14-pg-vectorize 0.26.0 u24.x86_64 pigsty 6.7 MiB postgresql-14-pg-vectorize_0.26.0-1PIGSTY~noble_amd64.deb
postgresql-14-pg-vectorize 0.26.0 u24.aarch64 pigsty 6.4 MiB postgresql-14-pg-vectorize_0.26.0-1PIGSTY~noble_arm64.deb

Source

pig build pkg pg_vectorize;		# build rpm/deb

Install

Make sure PGDG and PIGSTY repo available:

pig repo add pgsql -u   # add both repo and update cache

Install this extension with pig:

pig install pg_vectorize;		# install via package name, for the active PG version
pig install vectorize;		# install by extension name, for the current active PG version

pig install vectorize -v 18;   # install for PG 18
pig install vectorize -v 17;   # install for PG 17
pig install vectorize -v 16;   # install for PG 16
pig install vectorize -v 15;   # install for PG 15
pig install vectorize -v 14;   # install for PG 14

Create this extension with:

CREATE EXTENSION vectorize CASCADE; -- requires pg_cron, pgmq, vector

Usage

pg_vectorize: The simplest way to do vector search on Postgres. Source: README.md

A Postgres extension that automates the transformation and orchestration of text to embeddings and provides hooks into the most popular LLMs. This allows you to get up and running and automate maintenance for vector search, full text search, and hybrid search, which enables you to quickly build RAG and search engines on Postgres.

This project relies heavily on pgvector for vector similarity search, pgmq for orchestration in background workers, and SentenceTransformers.

API Documentation: https://chuckhend.github.io/pg_vectorize/


Overview

pg_vectorize provides two ways to add semantic, full text, and hybrid search to any Postgres, making it easy to build retrieval-augmented generation (RAG) on Postgres.

Modes at a glance:

  • HTTP server (recommended for managed DBs): run a standalone service that connects to Postgres and exposes a REST API (POST /api/v1/table, GET /api/v1/search).
  • Postgres extension (SQL): install the extension into Postgres and use SQL functions like vectorize.table() and vectorize.search() (requires filesystem access to Postgres).

Quick Start – HTTP Server

Run Postgres and the HTTP servers locally using docker compose:

# runs Postgres, the embeddings server, and the management API
docker compose up -d

Load the example dataset into Postgres (optional):

psql postgres://postgres:postgres@localhost:5432/postgres -f server/sql/example.sql

Create an embedding job via the HTTP API. This generates embeddings for the existing data and continuously watches for updates or new data:

curl -X POST http://localhost:8080/api/v1/table -d '{
		"job_name": "my_job",
		"src_table": "my_products",
		"src_schema": "public",
		"src_columns": ["product_name", "description"],
		"primary_key": "product_id",
		"update_time_col": "updated_at",
		"model": "sentence-transformers/all-MiniLM-L6-v2"
	}' -H "Content-Type: application/json"
{"id":"16b80184-2e8e-4ee6-b7e2-1a068ff4b314"}

Search using the HTTP API:

curl -G \
  "http://localhost:8080/api/v1/search" \
  --data-urlencode "job_name=my_job" \
  --data-urlencode "query=camping backpack" \
  --data-urlencode "limit=1" \
  | jq .
[
  {
    "description": "Storage solution for carrying personal items on ones back",
    "fts_rank": 1,
    "price": 45.0,
    "product_category": "accessories",
    "product_id": 6,
    "product_name": "Backpack",
    "rrf_score": 0.03278688524590164,
    "semantic_rank": 1,
    "similarity_score": 0.6296013593673706,
    "updated_at": "2025-10-05T00:14:39.220893+00:00"
  }
]

Which Mode Should I Pick?

  • Use the HTTP server when your Postgres is managed (RDS, Cloud SQL, etc.) or you cannot install extensions. It requires only that pgvector is available in the database. You run the HTTP services separately.
  • Use the Postgres extension when you self-host Postgres and can install extensions. This provides an in-database experience and direct SQL APIs for vectorization and RAG.

Quick Start – Postgres Extension (SQL)

CREATE EXTENSION vectorize CASCADE;

Use vectorize.table() to create an embedding job and vectorize.search() to perform semantic search directly from SQL.

Last updated on