From: chsami (@chsami) <noreply+chsami@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: [pgvector/pgvector] issue #889: pgvector 0.8.0 + hnsw on azure postgresql flexible server stopped working
Date: Thu, 21 Aug 2025 12:38:47 +0000
Message-ID: <gh-pgvector-pgvector-889@github.com> (raw)
Description:
We are seeing queries fail in production after upgrading to pgvector 0.8.0
Query example:
WHERE (t."Embedding" <=> $1) < 0.6
ORDER BY t.c
Error output:
server process (PID 3853) was terminated by signal 4: Illegal instruction
detail: Failed process was running
terminating any other active server processes
FATAL: the database system is in recovery mode
Environment:
pgvector version: 0.8.0
PostgreSQL version: 16.9
Hosting: Azure Database for PostgreSQL [Flexible Server/Single Server]
Steps to reproduce:
Run a similarity query using <=> on a table with embeddings.
Observe crash with Illegal instruction.
Expected behavior:
Query should return similarity results without crashing the server.
Actual behavior:
Server process crashes and triggers recovery mode.
Notes:
Issue seems related to the upgrade from pgvector 0.7.x to 0.8.0.
GPT analysis:
**Root Cause – CPU Instruction Incompatibility**
The likely cause of these crashes is a CPU instruction mismatch between the pgvector extension and the underlying hardware. In pgvector 0.8.0, the extension was compiled with aggressive optimizations (using -march=native on some platforms) to leverage advanced CPU instructions for speed
[pgxn.org](https://pgxn.org/dist/vector/0.8.0/#:~:text=By%20default%2C%20pgvector%20compiles%20with,extension%2...)
. This means the binary may include SIMD/vector instructions (e.g. AVX/AVX2) that are available on the build machine’s CPU. If the Azure DB server’s actual CPU does not support those specific instructions, any attempt to execute them will trigger an illegal instruction fault, crashing the server process
Happens consistently on production workloads.