{"data":{"slug":"pgvector-pgvector","name":"pgvector","tagline":"Open-source vector similarity search for Postgres","github_url":"https://github.com/pgvector/pgvector","owner":"pgvector","repo":"pgvector","owner_avatar_url":"https://avatars.githubusercontent.com/u/98363230?v=4","primary_language":"C","stars":22375,"forks":1257,"topics":["approximate-nearest-neighbor-search","nearest-neighbor-search"],"archived":false,"github_pushed_at":"2026-07-28T09:49:19+00:00","maintenance_label":"Very active","url":"https://www.graphcanon.com/tools/pgvector-pgvector","markdown_url":"https://www.graphcanon.com/tools/pgvector-pgvector.md","api_url":"https://www.graphcanon.com/api/graphcanon/tools/pgvector-pgvector","graph_url":"https://www.graphcanon.com/api/graphcanon/graph?tool=pgvector-pgvector","description":"Open-source vector similarity search for Postgres","homepage_url":null,"license":"Other","open_issues":14,"watchers":136,"ai_summary":"pgvector extends PostgreSQL to enable efficient vector similarity searches.","readme_excerpt":"## Getting Started\n\nEnable the extension (do this once in each database where you want to use it)\n\n```tsql\nCREATE EXTENSION vector;\n```\n\nCreate a vector column with 3 dimensions\n\n```sql\nCREATE TABLE items (id bigserial PRIMARY KEY, embedding vector(3));\n```\n\nInsert vectors\n\n```sql\nINSERT INTO items (embedding) VALUES ('[1,2,3]'), ('[4,5,6]');\n```\n\nGet the nearest neighbors by L2 distance\n\n```sql\nSELECT * FROM items ORDER BY embedding <-> '[3,1,2]' LIMIT 5;\n```\n\nAlso supports inner product (`<#>`), cosine distance (`<=>`), and L1 distance (`<+>`)\n\nNote: `<#>` returns the negative inner product since Postgres only supports `ASC` order index scans on operators\n\n---\n\n### Docker\n\nGet the [Docker image](https://hub.docker.com/r/pgvector/pgvector) with:\n\n```sh\ndocker pull pgvector/pgvector:pg18-trixie\n```\n\nThis adds pgvector to the [Postgres image](https://hub.docker.com/_/postgres) (replace `18` with your Postgres server version, and run it the same way).\n\nSupported tags are:\n\n- `pg18-trixie`, `0.8.5-pg18-trixie`\n- `pg18-bookworm`, `0.8.5-pg18-bookworm`, `pg18`, `0.8.5-pg18`\n- `pg17-trixie`, `0.8.5-pg17-trixie`\n- `pg17-bookworm`, `0.8.5-pg17-bookworm`, `pg17`, `0.8.5-pg17`\n- `pg16-trixie`, `0.8.5-pg16-trixie`\n- `pg16-bookworm`, `0.8.5-pg16-bookworm`, `pg16`, `0.8.5-pg16`\n- `pg15-trixie`, `0.8.5-pg15-trixie`\n- `pg15-bookworm`, `0.8.5-pg15-bookworm`, `pg15`, `0.8.5-pg15`\n- `pg14-trixie`, `0.8.5-pg14-trixie`\n- `pg14-bookworm`, `0.8.5-pg14-bookworm`, `pg14`, `0.8.5-pg14`\n- `pg13-trixie`, `0.8.5-pg13-trixie`\n- `pg13-bookworm`, `0.8.5-pg13-bookworm`, `pg13`, `0.8.5-pg13`\n\nYou can also build the image manually:\n\n```sh\ngit clone --branch v0.8.5 https://github.com/pgvector/pgvector.git\ncd pgvector\ndocker build --pull --build-arg PG_MAJOR=18 -t myuser/pgvector .\n```\n\nIf you increase `maintenance_work_mem`, make sure `--shm-size` is at least that size to avoid an error with parallel HNSW index builds.\n\n```sh\ndocker run --shm-size=1g ...\n```","github_created_at":"2021-04-20T21:13:52+00:00","created_at":"2026-07-07T15:08:21.210201+00:00","updated_at":"2026-07-28T18:00:47.821505+00:00","categories":[{"slug":"vector-databases","name":"Vector Databases","url":"https://www.graphcanon.com/categories/vector-databases","markdown_url":"https://www.graphcanon.com/categories/vector-databases.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/vector-databases"}],"tags":[{"slug":"approximate-nearest-neighbor-search","name":"approximate-nearest-neighbor-search"},{"slug":"nearest-neighbor-search","name":"nearest-neighbor-search"}],"trust":{"provenance":{"is_fork":false,"github_id":359952601,"owner_type":"Organization","methodology":"github_public_v1","parent_repo":null,"near_duplicate_slugs":[]},"computed_at":"2026-07-28T18:00:46.975Z","maintenance":{"label":"Very active","score":96,"methodology":"github_public_v1","releases_90d":0,"days_since_push":0,"last_release_at":null},"security_summary":{"status":"no_lockfile","scanner":null,"low_count":0,"high_count":0,"last_scan_at":"2026-07-11T10:27:59.135Z","medium_count":0,"scan_profile":"none","critical_count":0}},"capability_facts":{"scan":{"source":"repo_scan","observed_at":"2026-07-28T18:00:47.475Z"},"deploy":{"source":"dockerfile:Dockerfile","self_host":true,"observed_at":"2026-07-28T18:00:47.475Z","managed_saas":false},"languages":{"value":["c"],"source":"github.language","observed_at":"2026-07-28T18:00:47.475Z"},"has_docker":{"value":true,"source":"dockerfile:Dockerfile","observed_at":"2026-07-28T18:00:47.475Z"},"license_spdx":{"value":"Other","source":"github.license","observed_at":"2026-07-28T18:00:47.475Z"}},"decision_facts":{"hosting":null,"pricing":null,"requirements":null,"constraints":null,"when_to_use":["When you need to perform approximate nearest neighbor or exact nearest neighbor searches on your vectors and prefer to keep the data within a PostgreSQL database.","For projects requiring customization or integration with Postgres-specific features such as stored procedures, triggers, and complex SQL queries.","If compatibility with specific versions of PostgreSQL is critical for your project (versions 13 through 18 are supported)."],"when_not_to_use":["When the requirement is to have a standalone in-memory or distributed vector database system as pgvector remains strictly integrated with PostgreSQL.","For scenarios where high availability and clustering capabilities without manual intervention (beyond what standard PostgreSQL offers) are necessary.","If the application's performance benefits significantly from a pre-optimized engine tailored specifically towards vector searches, rather than leveraging an extension within PostgreSQL."],"source":"enrich:decision_facts","observed_at":"2026-07-11T10:59:31.067Z"},"constraint_facets":null,"decision_summary":[{"label":"Adopt for","value":"pgvector extends PostgreSQL with efficient vector similarity searches."}]}}