Postgresql with pgvector
misabegovic
PROOP

2 months ago

I have a production environment using a postgresql database that doesn't have a pgvector extension. I've deployed some functionality that requires pgvector and I figured I'd be able to add the extension. To my surprise, I was not able to do so. Thankfully I was able to revert to a stable version of a release in the meantime, but I do need pgvector and I already have data in the database that shouldn't be affected by this change. What are my options here? I see there's a template for pg with pgvector, but I think it might be too late for that. Is there any easy way for me to add the pgvector extension to my current database?

Solved$10 Bounty

5 Replies

2 months ago

I see two ways of doing what you want:

  • Get the same exact PostgreSQL version and PGVector and then swap the volume

  • Do a dump of the volume and then restore it onto the new service (recommended way)

Both will require downtime, and unfortunately there's no option that can prevent that.


misabegovic
PROOP

2 months ago

I'm configuring my app to use two databases right now. One as main prod for user facing data, another for pgvector stuff.


misabegovic
PROOP

2 months ago

Thanks for the answer, I might have to go a certain route of migration down the road, or keep them separated


2 months ago

Also a good option!


2 months ago

No problem, happy to help


Status changed to Solved passos about 2 months ago


Loading...