PG Vector Extension for postgres
andremaytorena
PROOP

2 months ago

Hey, I went through a few threads already and it was suggested that you can't install the extension by itself to a postgres db but that it was in the future plans, is this still not possible?

I have around 15 postgres databases, so migrating all of their data isn't really simple especially as they are often in use. Is there still no way of adding the pg vector extension?

Solved

0 Replies

andremaytorena
PROOP

2 months ago

8eca95b8-b3e6-413d-8ee9-deeebf5ebef1


irazvan2745
PRO

2 months ago

There is a way to add extensions?


andremaytorena
PROOP

2 months ago

Yeah but pg_vector isn't there


andremaytorena
PROOP

2 months ago

1430114787974447000


irazvan2745
PRO

2 months ago


uxuz
MODERATOR

2 months ago

There is no official straight forward way to add external extensions yet, one user suggested to replace the source of your Postgres database to the pgvector one and install it this way. I personally haven't tried it this way, but if you do want to try this route, make sure to backup your database beforehand. For example from [ghcr.io/railwayapp-templates/postgres-ssl:17](ghcr.io/railwayapp-templates/postgres-ssl:17) to pgvector/pgvector:pg17.


andremaytorena
PROOP

2 months ago

not trying to redeploy 15 databases and then have to migrate the data, and can't really have down time right now


andremaytorena
PROOP

2 months ago

Yeah I don't know if it was you or someone else that told me this a little bit ago, Im pretty sure I tried it and it didn't work


uxuz
MODERATOR

2 months ago

Did you run CREATE EXTENSION vector; after you deployed the pgvector image?


andremaytorena
PROOP

2 months ago

Maybe not, let me retry it


uxuz
MODERATOR

2 months ago

Make sure to backup your data before swapping out the source.


andremaytorena
PROOP

2 months ago

yeah just using a test db for now


andremaytorena
PROOP

2 months ago

1430117006987755500


uxuz
MODERATOR

2 months ago

Replace it to pgvector/pgvector:pg17 or another version depending on what your current Postgres version is.


andremaytorena
PROOP

2 months ago

Seems to have worked actually


andremaytorena
PROOP

2 months ago

Data seems intact


andremaytorena
PROOP

2 months ago

Not sure if I want to run this on my prod dbs tho, ill look more into it, maybe i can just make a good migration script


andremaytorena
PROOP

2 months ago

damn ram went up by 100%, from 200mb to 400mb idling, is that normal?


uxuz
MODERATOR

2 months ago

Most likely due to pgvector being enabled, not 100% sure since I am not familiar with it.


andremaytorena
PROOP

2 months ago

yh assume so, didnt think it would boost that much ram


uxuz
MODERATOR

a month ago

!s


Status changed to Solved uxuz about 2 months ago


Loading...