pg_diskann
pg_diskann · Azure Database for PostgreSQL extension for DiskANN approximate-nearest-neighbor vector indexes.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 101049 | pg_diskann | pg_diskann | 0.6.5 | RAG | Unknown | C |
PostgreSQL · 14, 15, 16, 17, 18
| Relationships | |
|---|---|
| Requires | vector |
Usage
Sources:
pg_diskann is the Azure Database for PostgreSQL Flexible Server extension for DiskANN approximate nearest-neighbor indexes over vector columns. It is provider-managed rather than a cataloged open-source PostgreSQL extension; availability, supported versions, and operational limits are controlled by Azure.
Enable and Query
Allow pg_diskann for the Azure server, then create it in each database together with its vector dependency:
The index is approximate. Measure recall and latency with production-shaped vectors, filters, and concurrency, and verify index use with EXPLAIN (ANALYZE, BUFFERS).
Tuning Index
Index storage parameters include max_neighbors, l_value_ib, product_quantized, pq_param_num_chunks, and pq_param_training_samples. Product quantization is available from version 0.6, reduces memory, and is required by the Azure guide for dimensions above 2,000, up to 16,000:
diskann.l_value_is trades query work for recall. diskann.iterative_search accepts relaxed_order, strict_order, or off; relaxed order may not emit exact distance order, while noniterative search cannot return more than its search-list size. Full-vector reranking of a larger inner candidate set can improve final ordering after a quantized search.
Operational Boundaries
Index construction can require substantial memory, storage, and time; Azure documents maintenance_work_mem, table parallel_workers, and server worker limits as build controls. Changing max_worker_processes requires a restart. Do not disable enable_seqscan globally to force an index: a local setting affects every table in that transaction and can hide planning or recall problems. The catalog version 0.6.5 should be confirmed against the extension version actually offered in the target Azure region before using version-specific options, and index rebuild, backup/restore, replica, failover, and upgrade behavior should be tested through Azure’s supported procedures.