Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Index creation error: ambuildempty: not yet implemented #190

Open
Mickael-van-der-Beek opened this issue Jan 8, 2025 · 0 comments
Labels
bug Something isn't working community pgvectorscale

Comments

@Mickael-van-der-Beek
Copy link

Mickael-van-der-Beek commented Jan 8, 2025

What happened?

About 11 hours after the beginning of the creation of the diskann index I see in the PostgreSQL logs the following error: ERROR: ambuildempty: not yet implemented.

The process ID logged with the error corresponds to the index creation process and the error seems to be thrown by the following line of code in pgvectorscale:

panic!("ambuildempty: not yet implemented")

By query the database, I can validate that PostgreSQL indicates the index as being not valid:

SELECT 
  pgi.indisvalid
FROM
  pg_stat_all_indexes
    AS psai
INNER JOIN
  pg_index
    AS pgi
    ON pgi.indrelid = psai.relid
WHERE
  psai.relname = 'mytable_embeddings'
;

Through a query on pg_stat_activity I can also confirm that the index creation query ended.

My table setup:

  • a mytable_embeddings UNLOGGED table containing about 21M rows
  • each row has an embedding column of type VECTOR(1024) (BERT-type embedding output)
  • both the table and index are created on the same tablespace ssd_02, which is a dedicated tablespace and physical SSD for this test with 3.5 TB free space.

My hardware setup is a bare metal server with the following config:

  • 96 cores, 192 threads
  • 512 GB of RAM
  • 4x SSDs of 3.5 TB

pgvectorscale extension affected

0.7.4

PostgreSQL version used

16.4

What operating system did you use?

Ubuntu 24.04 LTS on AMD x64

What installation method did you use?

Source

What platform did you run on?

On prem/Self-hosted

Relevant log output and stack trace

2025-01-07 18:35:46.573 GMT [postgres/psql/3288723] WARNING:  Inserted ItemPointer { block_number: 296474, offset: 10 } but it became an orphan
2025-01-07 22:28:20.572 GMT [postgres/psql/3288723] WARNING:  Inserted ItemPointer { block_number: 765846, offset: 11 } but it became an orphan
2025-01-08 05:38:00.124 GMT [postgres/psql/3288723] WARNING:  Indexed 21165914 tuples
2025-01-08 05:38:15.706 GMT [postgres/psql/3288723] ERROR:  ambuildempty: not yet implemented
2025-01-08 05:38:15.706 GMT [postgres/psql/3288723] STATEMENT:  CREATE INDEX CONCURRENTLY mytable_embeddings_l2_diskann_idx ON mytable_embeddings USING DISKANN (embedding VECTOR_L2_OPS) WITH (search_list_size = 100) TABLESPACE "ssd_02";

How can we reproduce the bug?

CREATE INDEX CONCURRENTLY
  mytable_embeddings_l2_diskann_idx
ON
  mytable_embeddings
USING
  DISKANN
  (
    embedding VECTOR_L2_OPS
  )
WITH
  (
    search_list_size = 100
  )
TABLESPACE
  "ssd_02"
;

Are you going to work on the bugfix?

🆘 No, could someone else please work on the bugfix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working community pgvectorscale
Projects
None yet
Development

No branches or pull requests

1 participant