Azure Database for PostgreSQL flexible server - Illegal instruction with pgvector 0.8.0

Vitalii Horbovyi 5 Reputation points
2025-09-04T10:58:25.9133333+00:00

I’m using Azure Database for PostgreSQL Flexible Server with the vector extension (pgvector 0.8.0). The server raises errors whenever I insert rows with an embedding column. Also, embedding column has HNSW index type.
In the server logs I found that the Postgres backend process is being terminated with an illegal instruction:

2025-09-04 07:47:40 UTC-68b69469.7-LOG: server process (PID 185892) was terminated by signal 4: Illegal instruction","detail": "Failed process was running: INSERT INTO embeddings (...)...
2025-09-04 07:47:40 UTC-68b69469.7-LOG: terminating any other active server processes 
2025-09-04 07:47:40 UTC-68b69469.7-LOG: all server processes terminated; reinitializing
2025-09-04 07:47:40 UTC-68b9441c.2d64f-LOG: database system was interrupted; last known up at 2025-09-04 07:47:20 UTC 
2025-09-04 07:47:40 UTC-68b9441c.2d64f-LOG: database system was not properly shut down; automatic recovery in progress 
2025-09-04 07:47:40 UTC-68b9441c.2d64f-LOG: redo starts at 6E/33029A78 
2025-09-04 07:47:40 UTC-68b9441c.2d64f-LOG: invalid record length at 6E/3302FF90: expected at least 24, got 0 
2025-09-04 07:47:40 UTC-68b9441c.2d64f-LOG: redo done at 6E/3302FF68 system usage: CPU: user: 0.00 s, system: 0.00 s, elapsed: 0.00 s 
2025-09-04 07:47:40 UTC-68b9441c.2d64f-LOG: could not do fast promotion, requesting for an end-of-recovery checkpoint 
2025-09-04 07:47:40 UTC-68b9441c.2d650-LOG: checkpoint starting: end-of-recovery immediate wait

I’ve seen others report the same issue, and some mentioned that moving their Flexible Server to Availability Zone 1 fixed it because the hardware there supported the CPU instructions used by pgvector. My server is already running in Zone 1, but I still encounter this problem.

Since Azure only provides pgvector 0.8.0 on Flexible Server, downgrading to 0.7.x isn’t possible.

What possible solutions or workarounds are there for this problem?

Azure Database for PostgreSQL
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Swapnesh Panchal 175 Reputation points Microsoft External Staff Moderator
    2025-09-04T12:55:31.6866667+00:00

    Hi Vitalii Horbovyi ,

    Thank you for the question and using MS Q&A platform.

    You are correct pgvector 0.8.0 with HNSW indexes may crash the server due to CPU instruction incompatibility on certain Azure hardware.
    will recommend you too use DiskANN as the stable alternative to HNSW and for more detail to similar issue you can refer this.

    If you have any further questions, feel free to respond in this same thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.