AIX Open Source

AIX Open Source

Share your experiences and connect with fellow developers to discover how to build and manage open source software for the AIX operating system

 View Only

Postgresql - Error with create vectorscale index: access method "diskann" does not exist

  • 1.  Postgresql - Error with create vectorscale index: access method "diskann" does not exist

    Posted 11 hours ago

    Hi,

    after resolving issues with Rust and libclang during installation of pgvectorscale on AIX I've got troubles when creating an index with the vectorscale access method.

    There were no errors while installing pgvectorscale but some warnings. But they should not harm. And I've could create vectorscale extension without any errors.

    postgres=# \dx
                     List of installed extensions
      Name   | Version |   Schema   |         Description
    ---------+---------+------------+------------------------------
     plpgsql | 1.0     | pg_catalog | PL/pgSQL procedural language
    (1 row)

    postgres=# create extension vector;
    CREATE EXTENSION
    postgres=# \dx
                                 List of installed extensions
      Name   | Version |   Schema   |                     Description
    ---------+---------+------------+------------------------------------------------------
     plpgsql | 1.0     | pg_catalog | PL/pgSQL procedural language
     vector  | 0.8.0   | public     | vector data type and ivfflat and hnsw access methods
    (2 rows)

    postgres=# create extension vectorscale;
    CREATE EXTENSION
    postgres=# \dx
                                   List of installed extensions
        Name     | Version |   Schema   |                     Description
    -------------+---------+------------+------------------------------------------------------
     plpgsql     | 1.0     | pg_catalog | PL/pgSQL procedural language
     vector      | 0.8.0   | public     | vector data type and ivfflat and hnsw access methods
     vectorscale | 0.7.1   | public     | diskann access method for vector search
    (3 rows)

    postgres=# CREATE TABLE if not exists test (
        id int PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,
        embedding VECTOR(3)
    );
    CREATE TABLE
    postgres=# insert into test (embedding) values ('[1,2,3]'), ('[4,5,6]');
    INSERT 0 2
    postgres=# CREATE INDEX ON test USING diskann (embedding vector_cosine_ops);
    ERROR:  access method "diskann" does not exist

    Bizarrely, I cannot find the diskann access method in pg_am. The access methods of vector (hnsw and ivfflat) are here.

    postgres=# select oid from pg_proc where proname like 'diskann%';
     oid
    -----
    (0 rows)

    postgres=# select * from pg_am;
      oid  | amname  |      amhandler       | amtype
    -------+---------+----------------------+--------
         2 | heap    | heap_tableam_handler | t
       403 | btree   | bthandler            | i
       405 | hash    | hashhandler          | i
       783 | gist    | gisthandler          | i
      2742 | gin     | ginhandler           | i
      4000 | spgist  | spghandler           | i
      3580 | brin    | brinhandler          | i
     50292 | ivfflat | ivfflathandler       | i
     50294 | hnsw    | hnswhandler          | i
    (9 rows)

    postgres=# select oid, proname from pg_proc where proname like 'hnsw%' or proname like 'ivfflat%';
      oid  |         proname
    -------+-------------------------
     50291 | ivfflathandler
     50293 | hnswhandler
     50295 | ivfflat_halfvec_support
     50296 | ivfflat_bit_support
     50297 | hnsw_halfvec_support
     50298 | hnsw_bit_support
     50299 | hnsw_sparsevec_support
    (7 rows)

    postgres=# select * from pg_am where amname = 'diskann';
     oid | amname | amhandler | amtype
    -----+--------+-----------+--------
    (0 rows)

    What's going on here? Where is the fault?

    Is the installation of pgvectorscale incomplete? I haven't seen any errors during installation.

    By the way, after installation of pgvectorscale the library libvectorscale.a was installed in /opt/freeware/lib64/postgresql. But I assume the includes shared-object is required in this directory an I've extracted it.

    /opt/freeware/lib64/postgresql# ar -X64 -x libvectorscale.a libvectorscale.so

    I've restarted postgres, dropped and recreated the extensions. But it doesn't help either.

    Any ideas?



    ------------------------------
    Emanuel Reisinger
    ------------------------------