From 7596b95517bfc11fff8aa39e4e0d328f8559e2f5 Mon Sep 17 00:00:00 2001 From: mnavon Date: Mon, 13 Jul 2026 12:59:52 +0300 Subject: [PATCH] immich: use actual PostgreSQL version for VectorChord package lookup (#15705) * immich: use actual PostgreSQL version for VectorChord package lookup * fix: update PostgreSQL version variable for VectorChord package deployment --- ct/immich.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ct/immich.sh b/ct/immich.sh index fd3d60a94..af15f4e1e 100644 --- a/ct/immich.sh +++ b/ct/immich.sh @@ -125,6 +125,8 @@ EOF systemctl stop immich-ml msg_ok "Stopped Services" VCHORD_RELEASE="1.1.1" + PG_VERSION=$(ls /etc/postgresql/ 2>/dev/null | sort -V | tail -1) + PG_VERSION=${PG_VERSION:-16} [[ -f ~/.vchord_version ]] && mv ~/.vchord_version ~/.vectorchord if check_for_gh_release "VectorChord" "tensorchord/VectorChord" "${VCHORD_RELEASE}" "updated together with Immich after testing"; then # dead tuples in smart_search/face_search make the REINDEX below fail with @@ -132,7 +134,7 @@ EOF # while still on the old extension version, a post-upgrade vacuum errors instead $STD sudo -u postgres psql -d immich -c "VACUUM (ANALYZE) smart_search;" $STD sudo -u postgres psql -d immich -c "VACUUM (ANALYZE) face_search;" - fetch_and_deploy_gh_release "VectorChord" "tensorchord/VectorChord" "binary" "${VCHORD_RELEASE}" "/tmp" "postgresql-16-vchord_*_$(arch_resolve).deb" + fetch_and_deploy_gh_release "VectorChord" "tensorchord/VectorChord" "binary" "${VCHORD_RELEASE}" "/tmp" "postgresql-${PG_VERSION}-vchord_*_$(arch_resolve).deb" systemctl restart postgresql $STD sudo -u postgres psql -d immich -c "ALTER EXTENSION vector UPDATE;" $STD sudo -u postgres psql -d immich -c "ALTER EXTENSION vchord UPDATE;"