Hi Sami Chkhachkhi,
Thanks for posting your query on Microsoft Q&A!
It looks like you're encountering some issues with pgvector after upgrading to version 0.8.0 on your Azure PostgreSQL Flexible Server. The error message you're seeing suggests that there may be a CPU instruction incompatibility. This often happens when the extension is compiled with optimizations that aren't supported by the underlying hardware, which can lead to the "Illegal instruction" error and crash the server process.
Recommended approach
Since the issue is binary-level incompatibility, try to roll back to the last known good version (0.7.x).
Step 1 : Verify the crash in logs
From Azure portal >Flexible Server > Logs, confirm entries such as:
server process (PID 3853) was terminated by signal 4: Illegal instruction
FATAL: the database system is in recovery mode
Step 2 : Roll back pgvector to 0.7.x
Connect to the database (via psql
, Azure CLI, or Cloud Shell):
psql "host=<your-server>.postgres.database.azure.com \
port=5432 sslmode=require \
dbname=<your-db> \
user=<admin>@<your-server>"
Then run:
-- Remove the problematic version
DROP EXTENSION IF EXISTS pgvector;
-- Re-install the last stable version
CREATE EXTENSION pgvector VERSION '0.7.1';
(replace 0.7.1
with the version you were using before the upgrade)
Step 3: Validate
Re-run your similarity query:
SELECT *FROM your_table t WHERE (t."Embedding" <=> $1) < 0.6 ORDER
Note:
- Always validate extension upgrades in a staging environment with the same CPU class as production.
- Keep a rollback script handy for mission-critical workloads.
- Avoid re-upgrading to 0.8.0 until a compatible binary is provided.
Once you tried it, please let us know if the previous version (0.7.x) work without any problems on the same server.
pgvector 0.8.0 was built with CPU optimizations that require hardware instructions not supported on the CPUs running Azure Database for PostgreSQL Flexible Server in France Central. Because of that, the extension is not compatible in its current form and leads to crashes when those instructions are executed.
Hope this helps! If it does, please upvote so others in the community can find it useful.
Thanks,
Kalyani