Skip to content

Add comment with workaround for PostgreSQL crash with pgvector v0.6.1 on ARM64 #382

@sahilds1

Description

@sahilds1

Bug Report: PostgreSQL Segmentation Fault with pgvector v0.6.1 on ARM64

Summary

PostgreSQL crashes with segmentation fault when executing vector similarity queries using pgvector v0.6.1 on ARM64 architecture causing chatbot functionality to fail.

Environment

  • OS: Linux (Docker container)
  • Architecture: aarch64 (ARM64)
  • PostgreSQL Version: 15.14
  • pgvector Version: v0.6.1
  • Application: Django backend with RAG embeddings feature

Issue Description

The PostgreSQL database process terminates with signal 11 (segmentation fault) when executing vector similarity searches using the <-> operator on embedding vectors.

Error Details

2025-08-19 23:58:53.756 UTC [1] LOG:  server process (PID 65) was terminated by signal 11: Segmentation fault
2025-08-19 23:58:53.756 UTC [1] DETAIL:  Failed process was running: SELECT "api_embeddings"."id", ... ("api_embeddings"."embedding_sentence_transformers" <-> '[vector_data...]') AS "distance" FROM "api_embeddings"

Reproduction Steps

  1. Build custom PostgreSQL Docker image with pgvector v0.6.1 on ARM64
  2. Execute vector similarity query using <-> operator
  3. Database crashes with segmentation fault

Build Configuration

Dockerfile:

FROM postgres:15
RUN apt-get update && apt-get install -y ca-certificates git build-essential postgresql-server-dev-15
RUN cd /tmp && git clone --branch v0.6.1 https://github.com/pgvector/pgvector.git && cd pgvector && make && make install

Additional Context

  • ARM64 compatibility warning observed: Can't read MIDR_EL1 sysfs entry
  • PostgreSQL automatically recovers after crash
  • Issue is specific to ARM64 architecture
  • No issues reported on x86_64

Root Cause

pgvector v0.6.1 has known stability issues with ARM64 processors, particularly affecting vector similarity operations.

Solution

Replace custom PostgreSQL build with official pgvector image:

services:
  db:
    image: pgvector/pgvector:pg15
    # ... rest of configuration

Status

RESOLVED - Using official pgvector Docker image eliminates segmentation faults and restores full functionality.

Impact

  • Severity: High (database crashes)
  • Scope: ARM64 deployments using custom pgvector builds
  • Workaround: Use official pgvector/pgvector:pg15 Docker image
  • Alternative: Downgrade to pgvector v0.5.1 for custom builds

Metadata

Metadata

Assignees

Labels

BugSomething isn't working

Type

No type

Projects

Status

Ready for Dev Review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions