Skip to content

fix(pgvector): fix vector extension not existing before register_vector - #830

Open
s-h-a-d-o-w wants to merge 1 commit into
zilliztech:mainfrom
s-h-a-d-o-w:patch-2
Open

fix(pgvector): fix vector extension not existing before register_vector#830
s-h-a-d-o-w wants to merge 1 commit into
zilliztech:mainfrom
s-h-a-d-o-w:patch-2

Conversation

@s-h-a-d-o-w

Copy link
Copy Markdown
Contributor

This fixes:

Traceback (most recent call last):
  File "/home/andy/temp/vdbb/.venv/lib/python3.12/site-packages/vectordb_bench/interface.py", line 179, in _async_task_v2
    case_res.metrics = runner.run(drop_old)
                       ^^^^^^^^^^^^^^^^^^^^
  File "/home/andy/temp/vdbb/.venv/lib/python3.12/site-packages/vectordb_bench/backend/task_runner.py", line 151, in run
    self._pre_run(drop_old)
  File "/home/andy/temp/vdbb/.venv/lib/python3.12/site-packages/vectordb_bench/backend/task_runner.py", line 142, in _pre_run
    self.init_db(drop_old)
  File "/home/andy/temp/vdbb/.venv/lib/python3.12/site-packages/vectordb_bench/backend/task_runner.py", line 131, in init_db
    self.db = db_cls(
              ^^^^^^^
  File "/home/andy/temp/vdbb/.venv/lib/python3.12/site-packages/vectordb_bench/backend/clients/pgvector/pgvector.py", line 58, in __init__
    self.conn, self.cursor = self._create_connection(**self.connect_config)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/andy/temp/vdbb/.venv/lib/python3.12/site-packages/vectordb_bench/backend/clients/pgvector/pgvector.py", line 93, in _create_connection
    register_vector(conn)
  File "/home/andy/temp/vdbb/.venv/lib/python3.12/site-packages/pgvector/psycopg/register.py", line 12, in register_vector
    register_vector_info(context, info)
  File "/home/andy/temp/vdbb/.venv/lib/python3.12/site-packages/pgvector/psycopg/vector.py", line 49, in register_vector_info
    raise psycopg.ProgrammingError('vector type not found in the database')
psycopg.ProgrammingError: vector type not found in the database

@sre-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: s-h-a-d-o-w
To complete the pull request process, please assign xuanyang-cn after the PR has been reviewed.
You can assign the PR to them by writing /assign @xuanyang-cn in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants