-
Notifications
You must be signed in to change notification settings - Fork 37
[ADD] Add pgvector library #26
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
Conversation
c337016 to
95614e5
Compare
|
What is the cost in build times of adding this? |
|
For PG ≥ 12 (where the package is available), I’ve been testing locally and the build is ~2–5 seconds slower compared to not installing it. For PG 11 the package is skipped, so there is no extra cost. |
|
Another option would be to control this with an environment variable (e.g. WITH_PGVECTOR=1). Then, in doodba-copier-template we could enable this variable automatically only for Odoo ≥ 19, while still keeping it optional for those deployments (so even on Odoo 19 it could be disabled if not required). |
|
OK, it's not too much then. |
|
@josep-tecnativa @pedrobaeza have these changes been added to the 17-alpine tag? |
|
Hi @JordiMForgeFlow , yes this changes are already added on the 17-apline latest tag |
|
@josep-tecnativa then I am missing something, I still get the error when I try to install AI module. I am using the doodba copier template, is there any other configuration needed besides of what comes by default? |
|
maybe you have not pulled and built the latest image |
|
@josep-tecnativa yes, I have the latest one (I compared the digest). I tried also removing the existing volumes and even with a fresh doodba 19 but I still got the error. |
|
@josep-tecnativa I have been doing some more digging here, and I have seen that (at least in my case) the problem is that the vector extension files are stored in /usr/share/postgresql/extension inside the container, but when you want to create the extension the files are trying to be found under /usr/local/share/postgresql/extension |
|
@josep-tecnativa the way I have been able to fix it is by adding this to the RUN commands: && cp /usr/share/postgresql/extension/vector* /usr/local/share/postgresql/extension/ |
|
Great! Could you please, open a PR to apply this fix @JordiMForgeFlow ? |
|
PR opened in #27 |
This PR installs postgresql-pgvector in the image and allows enabling the extension at cluster init.
Fixes Tecnativa/doodba#677