Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feasibility of migrating from pgvecto.rs to VectorChord just through the provided Docker images #212

Open
mertalev opened this issue Mar 17, 2025 · 6 comments
Labels
area/ecosystem 🌲 type/question 🙋 Further information is requested

Comments

@mertalev
Copy link

mertalev commented Mar 17, 2025

Hi! I'm working on migrating Immich from pgvecto.rs to VectorChord and so far it seems like it has to be a multi-phase operation:

  1. Set an env to instruct the server to remove any reference to pgvecto.rs
  2. Start the server and DB
  3. Bring down server and DB (only after the server is finished changing types, dropping indices and the extension itself)
  4. Change image name to the new vectorchord image
  5. Bring the server and DB back up

Without these steps, any operation on these columns leads to ERROR: could not access file "$libdir/vectors": No such file or directory. I'm wondering if there's a way to make this simpler for admins with less room for error. One solution would be to install both extensions in the same image, which removes steps 1, 2 and 3 (and without a timing concern). We're considering this but would like to avoid rolling our own images if possible.

Would shipping pgvecto.rs with these images be an option? Or depending on how much of the pgvecto.rs functionality is needed, it could maybe contain a "dummy" library that's just enough to perform the migration?

@gaocegege gaocegege added area/ecosystem 🌲 type/question 🙋 Further information is requested labels Mar 18, 2025
@VoVAllen
Copy link
Member

We've worked with one user moving to VectorChord. I think the easiest way is to bring those two extensions together. For minimal risk, you can copy existing column to a new one with pgvector type. And build index on that, and alter/swap the column name. This minimizes the potential risks.

@mertalev
Copy link
Author

I think the easiest way is to bring those two extensions together.

This is where I landed as well and what the migration guide recommends, but this isn't possible when going from the pgvecto.rs image to the official VectorChord image. Using the official images would ideally be one of the easiest ways since they prepare environments for you, rather than the hardest.

@mertalev mertalev changed the title Feasability of migrating from pgvecto.rs to VectorChord just through the provided Docker images Feasibility of migrating from pgvecto.rs to VectorChord just through the provided Docker images Mar 20, 2025
@VoVAllen
Copy link
Member

I think we can prepare a dedicated image for migration, which contains pgvecto.rs and vectorchord together. And user can use vectorchord-only image after migration, or keep use the migration image won't have any problems. What do you think?

@mertalev
Copy link
Author

That would be perfect!

@xieydd
Copy link
Member

xieydd commented Apr 1, 2025

@mertalev Sure, could you please specify the versions of pgvecto.rs and vectorchord you require?

@mertalev
Copy link
Author

mertalev commented Apr 1, 2025

pgvecto.rs 0.3.0 is backward compatible with 0.2.0, right? 0.3.0 should cover the range of versions we support (0.2.0 - 0.3.0). The latest release of VectorChord would be best.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ecosystem 🌲 type/question 🙋 Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants