How to use pgvector in railway's postgres database?
byteupai
FREEOP

2 years ago

I am unable to use the pgvector in my existing postgres database. can you guide how to deploy it in my existing database and how can I use it?

Solved

28 Replies

byteupai
FREEOP

2 years ago

abb46987-3c03-44a4-9717-c0ad17b59a6f


2 years ago

you would want to deploy the pgvector template into your account, and then pg_backup the old database, and pg_restore to the new database


byteupai
FREEOP

2 years ago

is there are any blog or any guide video so it will help me a lot


2 years ago

i'm sure there are plently of articles out there on how to use pg_backup and pg_restore that would help you, they would be just a quick online search away


byteupai
FREEOP

2 years ago

how to do that in fresh new database


byteupai
FREEOP

2 years ago

I have explored some options but didn't understand properly


2 years ago

are you asking how to deploy pgvector?


byteupai
FREEOP

2 years ago

yes


byteupai
FREEOP

2 years ago

I have deployed but when I am using this command then it saying

railway=# SELECT * FROM pg_available_extensions WHERE name = 'vector';

name | default_version | installed_version | comment

------+-----------------+-------------------+---------

(0 rows)


2 years ago

open up your project, click the + Create button at the top right, choose template, search for "pgvector", then click deploy template


2 years ago

you have a regular database deployed, you need to deploy pgvector first


byteupai
FREEOP

2 years ago

1324629743328432230


2 years ago

give this page a read -

then follow the steps i have provided


byteupai
FREEOP

2 years ago

I have added the template in my postgres database


byteupai
FREEOP

2 years ago

but still getting this issue:

railway=# CREATE EXTENSION IF NOT EXISTS 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.


byteupai
FREEOP

2 years ago

check this


byteupai
FREEOP

2 years ago

1324640449818005534


2 years ago

you need to connect to the pgvector database


byteupai
FREEOP

2 years ago

how?


2 years ago

the same way you connect to Postgres


byteupai
FREEOP

2 years ago

1324643530924228628


byteupai
FREEOP

2 years ago

like this?


byteupai
FREEOP

2 years ago

?


byteupai
FREEOP

2 years ago

?


byteupai
FREEOP

2 years ago

Done!


byteupai
FREEOP

2 years ago

thanks


byteupai
FREEOP

2 years ago

solved


2 years ago

!s


Status changed to Solved brody over 1 year ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...