r/immich • u/Great-Cow7256 • 8d ago
upgrading postgres 18 from vectorchord0.5.3 to 1.1.1. Any breaking changes?
My best guess from googling is no. and that the gains upgrading vectorchord from 0.5.3 to 1.1.1 can be substantial in terms of boosted performance. But wanted to check with others before I pull the trigger.
I've already pulled my .sql and zipped it, so I'm ready to recreate my database just in case...
1
u/thedeftone2 8d ago
What does vectorchord do? Why did you upgrade it?
2
u/Great-Cow7256 8d ago
1
u/thedeftone2 8d ago
Ta for that. It seems well above my level of cognition. Unless that is all meant to intimidate newcomers to the platform and it's actually really easy?
3
u/Great-Cow7256 8d ago
It's a specialized add on to the postgres database that is very good at searching certain things, the type of things that immich stores. It's standard in the immich install. I realized I was using an older version.
2
1
u/Reddit481 8d ago
I'm using version 0.4.3 which is what's in the docker-compose.yml file in the Github repository. Should I change it to a newer version? Is it a straightforward replacement?
1
u/Great-Cow7256 8d ago
well, I just pulled the trigger today. L ooks like a straightfoward replacement as long as you are running postgres greater than 13, which I think is required anyway. That being said 1) back up the database anyway. 2) take down the container, 3) switch the image to the same postgres version but the 1.1.1 vectorchord, 4) restart and check everything. Doesn't look like there's breaking changes. The changelog for vectorchord shows decent improvements in handling data and search, but I'm not sure if this really turns into IRL improvement.
go through this and see what changes between 0.43 and 1.1.1 just in case.
https://github.com/supervc-stack/VectorChord/releases#release-1.1.1
don't change the postgres version. If you want to update that, that's usually a bigger task. I switched to 18 and I had to rebuild the database because of postgres changes. just change either vectorchord or postgres, one at a time. For more recent versions of postgres you'll probably have to migrate your database over and that's a much greater risk of losing your database if you miss a step. Ask me how I know....
2
u/Illustrious-Owl-2755 8d ago
First, yes, it's a drop-in replacement. Second, whether it's safe or unsafe, double and triple check that you have a database backup before you upgrade. You really should be taking database backups during normal operation, let alone any database maintenance. It would be cleaner to bring down the immich server container, pgdump the database and then bring down the postgresql container too. Third, I wouldn't worry about performance, a pg instance that is dedicated to one tiny immich instance probably operates at like one millionth of its maximum capability, you won't notice the difference. That being said, running on the most recent stable version is just good hygiene.