Skip to content

Conversation

@mertalev
Copy link
Member

Description

The new 0.4 release has significant performance improvements without any issue upgrading. This PR extends the version range to include it. As it is a better default and the upgrade is seamless, it also changes the Compose files accordingly.

Note: this is a completely optional update; 0.3.0 is still fine.

How Has This Been Tested?

Tested upgrading from 0.3.0, searching and running facial recognition without any issues.

@github-actions github-actions bot added documentation Improvements or additions to documentation 🗄️server labels May 24, 2025
@mmomjian
Copy link
Collaborator

For standalone the process should be:

docker compose down 
dpkg -i vchord.deb
ALTER EXTENSION vchord UPDATE;
docker compose up -d

I’ll test this weekend to confirm.

@mmomjian
Copy link
Collaborator

Seems to work fine on my testing. Debian host installed Postgres, vchord 0.4.1.

@mertalev mertalev force-pushed the chore/vchord-0.4.1 branch from 3575048 to 929996f Compare May 27, 2025 14:56
@alextran1502 alextran1502 enabled auto-merge (squash) May 28, 2025 14:37
@alextran1502 alextran1502 merged commit 3f08768 into main May 28, 2025
52 checks passed
@alextran1502 alextran1502 deleted the chore/vchord-0.4.1 branch May 28, 2025 14:38
@NicholasFlamy
Copy link
Collaborator

This only works fine with a fresh database. It breaks the server if you have an existing one.

@mmomjian
Copy link
Collaborator

This only works fine with a fresh database. It breaks the server if you have an existing one.

Can you expand on this? Worked fine for me using pre-existing postgres install.

@NicholasFlamy
Copy link
Collaborator

This only works fine with a fresh database. It breaks the server if you have an existing one.

Can you expand on this? Worked fine for me using pre-existing postgres install.

I had a pre-existing postgres folder. I checked out main and it has the server container stuck.
I mv that folder out of the way, and detached checked out before this commit. It created a postgres folder.
I then detached checked out this commit and it gets stuck.

@benlenau
Copy link

I don't get this, it's merged and closed. I get 'Error: The VectorChord extension version is 0.4.1, but Immich only supports >=0.3 <0.4.' when updating to latest version. And immich_server keeps restarting.

@mertalev
Copy link
Member Author

It's in main, but it hasn't made its way into an Immich release just yet.

@benlenau
Copy link

It's in main, but it hasn't made its way into an Immich release just yet.

Yeah I see that now, and updated again, and it now works ... too quick I see.

savely-krasovsky pushed a commit to savely-krasovsky/immich that referenced this pull request Jun 8, 2025
* vchord 0.4.x

* oops

---------

Co-authored-by: Alex <[email protected]>
@sumitkgarg
Copy link

sumitkgarg commented Jun 19, 2025

Can I change below to the new docker compose and it will just work?

database:
container_name: immich_postgres
image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:739cdd626151ff1f796dc95a6591b55a714f341c737e27f045019ceabf8e8c52
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_DB: ${DB_DATABASE_NAME}
POSTGRES_INITDB_ARGS: '--data-checksums'
volumes:
# Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DATA_LOCATION in the .env file
- ${DB_DATA_LOCATION}:/var/lib/postgresql/data
healthcheck:
test: >-
pg_isready --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" || exit 1; Chksum="$$(psql --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" --tuples-only --no-align --command='SELECT COALESCE(SUM(checksum_fai>
interval: 5m
start_interval: 30s
start_period: 5m
command: >-
postgres -c shared_preload_libraries=vectors.so -c 'search_path="$$user", public, vectors' -c logging_collector=on -c max_wal_size=2GB -c shared_buffers=512MB -c wal_compression=on
restart: unless-stopped

@akostadinov
Copy link

btw the 1.135 release notes list vchord 0.4.2 and here I see 0.4.1

Is this discrepancy intentional?

@mertalev
Copy link
Member Author

0.4.x is supported. The PR only mentions 0.4.1 because this was the latest version at the time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog:enhancement documentation Improvements or additions to documentation 🗄️server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants