Postgres With Vectors?

Can anyone help me use postgres for vector data. I tried running:
CREATE EXTENSION vector;
but got:

railway=# CREATE EXTENSION vector;
ERROR:  extension "vector" is not available
DETAIL:  Could not open extension control file "/usr/share/postgresql/16/extension/vector.control": No such file or directory.
HINT:  The extension must first be installed on the system where PostgreSQL is running.

I do not know how to deal with this. I am using the defualt Postgres template.

Solved$10 Bounty

5 Replies

048dcb13-17c0-49e6-a509-420f8098afe8


9 months ago

You will have to use a Postgres template that has pgvector, such as https://railway.com/deploy/3jJFCA.


how should I go about moving all my data on my other one to this?


9 months ago

I would deploy the template, pgdump your old postgres database, pgrestore the just created backup to the new template, verify that everything is working correctly, change the reference variables of my services that used to point to the old postgres database to the new template and delete the old postgres database.


At the heart of what I am doing is what uxuz suggested. It was a little more complex than this though as I wanted to keep 24/7 uptime. So I also used pg pooling.


Status changed to Solved chandrika 9 months ago


Loading...