Skip to content

Add pgvector extension

Matt Kasa requested to merge mattkasa-add-pgvector into main

What does this merge request do and why?

Adds pgvector to be used by the new embedding database.

Relates to gitlab#404396.

How to set up and validate locally

  1. Ensure pgvector is enabled by adding the below configuration in gdk.yml:
---
pgvector:
  enabled: true
  1. Check out to this merge request's branch.
  2. Run gdk reconfigure.
  3. Run ls -l $(pg_config --pkglibdir)/vector.so to verify the extension file was installed.
  4. Run gdk psql.
  5. In psql, run: CREATE EXTENSION vector;
  6. In psql, run: \dx and see that the extension was added.
  7. In psql, run: DROP EXTENSION vector; to remove it to clean up since it will be used in a different database, not the gitlabhq_development database.

Impacted categories

The following categories relate to this merge request:

Merge request checklist

  • This change is backward compatible. If not, please include steps to communicate to our users.
  • Tests added for new functionality. If not, please raise an issue to follow-up.
  • Documentation added/updated, if needed.
  • Announcement added, if change is notable.
  • gdk doctor test added, if needed.
  • Add the ~highlight label if this MR should be included in the CHANGELOG.md.
Edited by Matt Kasa

Merge request reports