Repository navigation
nixos/immich: add support for VectorChord - #428568
Conversation
2aeb472 to
a8517d5
Compare
|
This approach looks reasonable to me but I am not an expert on any of the involved topics. |
a8517d5 to
7fd6a7f
Compare
|
LGTM, I've successfully deployed it to my server. Thanks! |
diogotcorreia
left a comment
There was a problem hiding this comment.
Before anyone accidentally merges this: keep in mind there are still items in the TODO list, like the release notes and an assertion.
Other than that, the code changes LGTM (but I haven't tested in my instance)
7fd6a7f to
c6c9f9f
Compare
Guanran928
left a comment
There was a problem hiding this comment.
Been using the patches on my instance for two days.
There was a problem hiding this comment.
How are we planning to handle the removal of pgvecto-rs support?
Immich is probably removing it later this year, since they plan to do it before the stable release (in 2025, see roadmap) according to this comment: #392710 (comment)
If it's before May 2026 (NixOS 26.05), does that mean we'll have to stop backporting Immich upgrades? Or can we remove the option (or make it do nothing) mid-cycle?
And what happens if it's before the NixOS 25.11 release in November?
Also, I'm assuming this is going to be backported to 25.05 (once #429374 is merged)
cc @mertalev perhaps we could coordinate on this
There was a problem hiding this comment.
The current plan is to remove pgvecto.rs support pretty soon (within the next month or so). What would be the impact of this on your side?
There was a problem hiding this comment.
@mertalev Hm... my understanding is that would be a breaking change and we wouldn't be able to continue backporting Immich updates to NixOS 25.05.
It would help a lot to have pgvecto.rs support at least until the end of November (when NixOS 25.11 releases), but obviously I (we) don't want to force you (and the other Immich devs) into maintaining support for it.
cc immich nixos maintainers (again 😅): @dotlambda @jvanbruegge @Scrumplex @Titaniumtown
If we can get support until November, I think it could be doable to:
- backport this PR to 25.05
- add to the 25.11 release notes that you must migrate to vectorchord before upgrading to 25.11
- once upstream drops support for pgvecto.rs (shortly after November), we could remove the options related to pgvecto.rs mid-cycle, since they would be no-op (or even before the 25.11 release in anticipation?)
Let me know if there are other options I'm not thinking about, I'm not very familiar with how strict the breaking changes policy is in nixpkgs.
PS: regarding breaking changes in Immich, we're having a related discussion in #432932
There was a problem hiding this comment.
@diogotcorreia After some discussion, we're okay with keeping the pgvecto.rs code as deprecated in the initial stable release, to be removed in the next major release after November. Does this work for you?
There was a problem hiding this comment.
@mertalev I think that's perfect, thank you so much!
Without this dependency, we may run into a race condition, especially in our tests. Signed-off-by: Sefa Eyeoglu <[email protected]>
15e4990 to
890b3d5
Compare
This is mostly good to go, but things are behind in the derivation. Immich migrated to vectorchord in place of pgvecto-rs, and that seems to be what opened up postgres 17 support. There's already a WIP PR for this migration: NixOS/nixpkgs#428568 Once this is merged, a few more changes are necessary after user / service are created: - Uncomment mediaLocation - Create zfs dataset for postgres database, migrate initialized data into that dataset and enable snapshots.
|
CC @dotlambda, I noticed your recent inactivity and I hope everything is alright! :D I thought I should wait for a review from you, as they are always very detailed and of exceptional quality. If you can't find the time to review this in the next few days, I will merge this as-is, and we can iron out any potential edge cases over time. |
This enables VectorChord in the database (currently) alongside pgvecto.rs. Note that VectorChord requires pgvector, which is enabled as well by this option. Signed-off-by: Sefa Eyeoglu <[email protected]>
Signed-off-by: Sefa Eyeoglu <[email protected]>
Signed-off-by: Sefa Eyeoglu <[email protected]>
890b3d5 to
a9c17c3
Compare
|
@ofborg test immich |
|
@ofborg test immich-vectorchord-migration |
|
Reminder that #429374 needs to be merged for this to be backported |
But should we really backport this given that pgvecto.rs will be supported through November? |
|
@dotlambda I thought the idea was to get this onto 25.05 so that we can ditch pgvecto.rs in 25.11? #428568 (comment) How would we handle the breaking change otherwise? |
I guess you're right. Anyway, backporting this PR should wait until people have tested it more.
If 25.11 never moves to an Immich version that doesn't support pgvecto.rs then people could always migrate from 25.05 to 25.11 and from there to unstable or (hopefully) 26.05. |
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin release-25.05
git worktree add -d .worktree/backport-428568-to-release-25.05 origin/release-25.05
cd .worktree/backport-428568-to-release-25.05
git switch --create backport-428568-to-release-25.05
git cherry-pick -x 1a244577826a5bb1aedcf2eb3350095320ccfb1a fd1994a8b7b262f57ba2d7647c32fd5fd23425b7 0b93bf6c2200343b6c5c6b5ecbca04c92c35e7f0 a9c17c34b1caa83a097177eb003604755a19d404 |
|
I'll do the backport manually |
This PR adds enable options for VectorChord and pgvecto.rs respectively. The latter is only enabled by default for
system.stateVersion<= 25.11.Once Immich drops support for pgvecto.rs, we can remove the option and ask users to migrate (i.e. remove the extension and schema).
I have added a test that tranistions from pgvecto.rs only -> pgvecto.rs + VectorChord (automatic migration by Immich) -> VectorChord only
This has not been tested in a real world setup yet!
TODO
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.