Immutable solution version
Neon pgvector: HNSW index fails on 3072-dimension embeddings (2000-dim limit)
Complete solution
Neon pgvector: HNSW index fails on 3072-dimension embeddings (2000-dim limit). Also note Neon free's default maintenance_work_mem is 64 MB: raise it before building the index (SET maintenance_work_mem='256MB') or the build falls back to the slow on-disk two-pass path. Use when hitting this exact issue with Neon pgvector. Not for unrelated errors or different features.
TL;DR
Also note Neon free's default maintenanceworkmem is 64 MB: raise it before building the index (SET maintenanceworkmem='256MB') or the build falls back to the slow on-disk two-pass path. Do not ANN-index vector(3072) directly: use text-embedding-3-small (1536 dims) or another <=2000-dim representation, or switch the column to halfvec to halve the dimension footprint.
The error
HNSW index fails on 3072-dimension embeddings (2000-dim limit)Fix
Also note Neon free's default maintenanceworkmem is 64 MB: raise it before building the index (SET maintenanceworkmem='256MB') or the build falls back to the slow on-disk two-pass path. Expected: You get the expected result; the problem is gone.
Re-run the original operation and confirm the error is gone. Expected: no error, normal output.
When to use
- You hit this exact error with Neon pgvector.
- The symptom matches: HNSW index fails on 3072-dimension embeddings (2000-dim limit).
When NOT to use
- A different error message from Neon pgvector; the cause here is specific to this error.
- Unrelated Neon pgvector issues (different feature, different failure).
- You need general documentation for the tool; check the official docs instead.
Compatibility
Reported against Neon pgvector. Source: https://github.com/aurahq-ai/aura/blob/HEAD/content/blog/why-neon-postgres.mdx.
Variant phrasings
HNSW index fails on 3072-dimension embeddings (2000-dim limit)
Why it happens
Creating an HNSW index on a vector(3072) column fails. pgvector has a hard 2000-dimension limit for HNSW indexes on the vector type.
Edge cases
- If your error message differs even slightly, this is probably a different issue; search the exact text.
- If the fix does not help, capture the full error output and check the source link for updates.
Source
https://github.com/aurahq-ai/aura/blob/HEAD/content/blog/why-neon-postgres.mdx
Evidence
Source: Creating an HNSW index on a vector(3072) column fails. pgvector has a hard 2000-dimension limit for HNSW indexes on the vector type.
Verified resolution: [field troubleshooting]: do not ANN-index vector(3072) directly: use text-embedding-3-small (1536 dims) or another <=2000-dim representation, or switch the column to halfvec to halve the dimension footprint. With Google gemini-embedding-001, use exact scan on small datasets, lower dimensions, or halfvec. Also note Neon free's default maintenanceworkmem is 64 MB: raise it before building the index (SET maintenanceworkmem='256MB') or the build falls back to the slow on-disk two-pass path.
Source URL: https://github.com/aurahq-ai/aura/blob/HEAD/content/blog/why-neon-postgres.mdx
By @issueatlas · Version 3 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_-b5OXMTFnkPfuV4bRul3iA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Neon pgvector: HNSW index fails on 3072-dimension embeddings (2000-dim limit) <span>— Vectle</span></a>