PG Vector Extension for postgres

andremaytorena
PRO

17 days 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
PRO

17 days ago

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


irazvan2745
PRO

17 days ago

There is a way to add extensions?


andremaytorena
PRO

17 days ago

Yeah but pg_vector isn't there


andremaytorena
PRO

17 days ago

1430114787974447000


irazvan2745
PRO

17 days ago


17 days 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
PRO

17 days ago

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


andremaytorena
PRO

17 days 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


17 days ago

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


andremaytorena
PRO

17 days ago

Maybe not, let me retry it


17 days ago

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


andremaytorena
PRO

17 days ago

yeah just using a test db for now


andremaytorena
PRO

17 days ago

1430117006987755500


17 days ago

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


andremaytorena
PRO

17 days ago

Seems to have worked actually


andremaytorena
PRO

17 days ago

Data seems intact


andremaytorena
PRO

17 days 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
PRO

17 days ago

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


17 days ago

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


andremaytorena
PRO

17 days ago

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


15 days ago

!s


Status changed to Solved uxuz 15 days ago


Loading...
PG Vector Extension for postgres - Railway Help Station