r/PostgreSQL • • 9d ago

Help Me! update guide 4 containers (docker)

/r/immich/comments/1y2qz34/update_guide_4_containers_docker/
0 Upvotes

8 comments sorted by

1

u/MongooseWonderful198 8d ago

The missing explanation for -upgrade is in the base-images Postgres README. That variant includes older PostgreSQL binaries and migrates an existing cluster to the image's major version on startup. The documented sequence then switches back to the same tag without -upgrade.

Since you're already on PostgreSQL 18, updating an 18-based image isn't itself a major-version migration. Keep the PostgreSQL major separate from the VectorChord version in the tag, and use the image recommended for your Immich release. For an actual major migration, the README also calls out space for a second data copy and retaining the old cluster. Take a database backup before that operation.

1

u/Foreignwelcome2 8d ago

Amazing! Thank you! Any hints on how to properly delete the .bak after upgrading?

1

u/MongooseWonderful198 2d ago

Don’t delete the .bak copy just because the new container starts. First take a fresh database backup, restart the normal image without the -upgrade tag, and verify Immich can read old and new assets, create a new record, and survive another restart. Also confirm the running server reports the expected PostgreSQL and VectorChord versions.

Once that passes and you know the backup restores, stop the stack and remove only the old data directory that the upgrade image renamed to .bak. Check the exact host path or named volume first; the name is image-specific. I would keep it through at least one verified backup cycle rather than deleting it during the upgrade window.

3

u/Discordbothost 9d ago

In the Immich DB, try `SELECT default_version, installed_version FROM pg_available_extensions WHERE name='vchord'`. That checks what's bundled vs in use. The digest keeps Docker on the same image build.

2

u/AutoModerator 9d ago

AI Policy:

Linux is not one of those anti-AI projects, and if somebody has issues with that, they can do the open-source thing and fork it. Or just walk away., Linus Torvalds.

Mod decisions will be based on the quality of the content, not who or what generated it.

Sub Resources:

Youtube Channel

Free Postgres Webinars and Workshops

Discord: People, Postgres, Data

Join us, we have cookies and nice people.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.