Azure Database for PostgreSQL flexible server crashes with vector 0.8.0

Luka K 0 Reputation points
2025-06-17T17:12:13.8033333+00:00

Hi,

Recently i created a Azure Database for PostgreSQL flexible server in my azure account. PostgreSQL version : 16.9 Availability zone: 2 Configuration: Burstable, B1ms, 1 vCores, 2 GiB RAM, 32 GiB storage High availability: Not enabled Location: North Europe

I also enabled vector and uuid-ossp in azure.extensions.

> \dx
                              List of installed extensions
   Name    | Version |   Schema   |                     Description                      
-----------+---------+------------+------------------------------------------------------
 plpgsql   | 1.0     | pg_catalog | PL/pgSQL procedural language
 uuid-ossp | 1.1     | public     | generate universally unique identifiers (UUIDs)
 vector    | 0.8.0   | public     | vector data type and ivfflat and hnsw access methods

Here is my problem:

> \d doc_44061291caacca00f1b4cb492ab201be
      Table "public.doc_44061291caacca00f1b4cb492ab201be"
Column    |          Type          | Collation | Nullable | Default 
```--------------+------------------------+-----------+----------+---------
 document_id  | character varying(255) |           | not null | 
 chunk_id     | integer                |           | not null | 
 page_content | text                   |           | not null | 
 metadata     | jsonb                  |           |          | 
 embedding    | vector(1536)           |           |          | 
Indexes:
    "doc_44061291caacca00f1b4cb492ab201be_pkey" PRIMARY KEY, btree (document_id, chunk_id)
    "idx_doc_44061291caacca00f1b4cb492ab201be_embedding" hnsw (embedding vector_cosine_ops) WITH (m='16', ef_construction='64')

> INSERT INTO doc_b0fc103cba3a6975a62ac244e90fc52a (document_id, chunk_id, page_content, metadata, embedding)
VALUES (
  'doc-123',
  1,
  'Test chunk for halfvec insert',
  '{"source": "test"}',
  (
    ARRAY[
      0.1, 0.2, 0.3, 0.4
    ] || ARRAY_FILL(0.0::float4, ARRAY[3068])
  )::halfvec
)
ON CONFLICT (document_id, chunk_id) DO UPDATE
SET
  page_content = EXCLUDED.page_content,
  metadata = EXCLUDED.metadata,
  embedding = EXCLUDED.embedding;
SSL SYSCALL error: EOF detected
The connection to the server was lost. Attempting reset: Failed.
The connection to the server was lost. Attempting reset: Failed.

And this is from logs: 2025-06-17 16:34:29 UTC-684c13ee.6-LOG: server process (PID 302290) was terminated by signal 4: Illegal instruction

On the other hand, 2 months ago i went through the same process of creating Azure Database for PostgreSQL flexible server and on that database same insert works fine. Here are details of that database (only minor version and availability zone are different): PostgreSQL version : 16.8 Availability zone: 1 Configuration: Burstable, B1ms, 1 vCores, 2 GiB RAM, 32 GiB storage High availability: Not enabled Location: North Europe

I suppose different CPU is used on the first one so it can not handle instructions properly. Can i update vector version or something? What would be your solution? I have to stay on this service (i can not switch to VM nor k8s).BR,

Luka

Azure Database for PostgreSQL
{count} votes

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.