How to add PGVECTOR to an existing database?
silverglad
PROOP

2 years ago

I already have a well-populated database, but I want to add the pgvector extension to it, the only way I found was to create a new database, but transferring all the data would be bad, is there any way I can install the extension directly into the existing database?

5 Replies

brody
EMPLOYEE

2 years ago

Do you have a backup of the data?


silverglad
PROOP

2 years ago

Yes, I'm using dbeaver and I backed up the development environment, which is the environment I want to add the pgvector to.


brody
EMPLOYEE

2 years ago

Why not deploy the pgvector template and then restore your backup to it?


mbrookson
PRO

a year ago

I'd also like to understand the simplest way to achieve this. The suggestion to deploy the pgvector template should work fine, but I don't like this solution because it assume that's the only extension you'd want to add.

What if you want to extend postgres further in the future?

Platforms like Supabase essentially have various postgres extensions available on the host machines so you can just run CREATE EXTENSION extension_name and it has everything required to add it to your instance.

Would be awesome if Railway could support this too.


paul181516
HOBBY

9 months ago

I need to add pgvector but if i try to backup the instance it says

Backups are only available for Teams on the Pro plan.

Is there anyway I could re deploy the current Postgres instance but having pgvector?


Loading...