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

Install pg_vector extension with pgxman #106

Merged
merged 4 commits into from
Jun 30, 2023
Merged

Conversation

owenthereal
Copy link
Collaborator

@owenthereal owenthereal commented Jun 30, 2023

What's changed?

  • Install pg_vector extension with pgxman. Note that it's intentional to always force installing extensions with pgxman for now to avoid Docker layer caching in case there are any updates made to the extension packages.
  • Add acceptance tests to validate pg_vector is working as expected.

A demo of pg_vector running with the built image:

postgres=# create extension vector;
CREATE EXTENSION
postgres=# CREATE TABLE items (id bigserial PRIMARY KEY, embedding vector(3));
CREATE TABLE
postgres=# INSERT INTO items (embedding) VALUES ('[1,2,3]'), ('[4,5,6]');
INSERT 0 2
postgres=# SELECT * FROM items ORDER BY embedding <-> '[3,1,2]' LIMIT 5;
 id | embedding 
----+-----------
  1 | [1,2,3]
  2 | [4,5,6]
(2 rows)

@owenthereal owenthereal requested a review from wuputah June 30, 2023 17:04
@owenthereal owenthereal force-pushed the owenthereal/pgxman_install branch from 53b2875 to 7a9a50e Compare June 30, 2023 17:07
@owenthereal owenthereal requested a review from JerrySievert June 30, 2023 17:18
_cputype="$(uname -m)"

case "$_cputype" in
i386 | i486 | i686 | i786 | x86)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wow, that's some backward compatibility!

Copy link
Contributor

@JerrySievert JerrySievert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@@ -310,7 +310,7 @@ def deep_update(a, b):
pg_stat_statements.track_utility: 'off'
extwlist.extensions: 'btree_gin,btree_gist,citext,extra_window_functions,first_last_agg,hll,\
hstore,hypopg,intarray,ltree,pgcrypto,pgq,pgq_node,pg_ivm,pg_trgm,postgres_fdw,mysql_fdw,multicorn,\
parquet_s3_fdw,tablefunc,uuid-ossp'
parquet_s3_fdw,vector,tablefunc,uuid-ossp'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fine for now, but we need to think about how to get out of this business of adding stuff to this setting

@owenthereal owenthereal merged commit 42e9ecf into main Jun 30, 2023
@owenthereal owenthereal deleted the owenthereal/pgxman_install branch June 30, 2023 20:13
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.

3 participants