#Infinite DB restart after vectorchord upgrade (windows + docker)

1 messages · Page 1 of 1 (latest)

shy crag
#

Hello. Had a working instance. Upgrading from 1.123 to 1.137. Updated the docker-compose file with the new db image. Restarted, and DB wouldn't start. Inifinite restart loop with: 2026-01-18 13:38:28 Using HDD storage 2026-01-18 13:38:29 The files belonging to this database system will be owned by user "postgres". 2026-01-18 13:38:29 This user must also own the server process. 2026-01-18 13:38:29 2026-01-18 13:38:29 The database cluster will be initialized with locale "en_US.utf8". 2026-01-18 13:38:29 The default database encoding has accordingly been set to "UTF8". 2026-01-18 13:38:29 The default text search configuration will be set to "english". 2026-01-18 13:38:29 2026-01-18 13:38:29 Data page checksums are enabled. 2026-01-18 13:38:29 2026-01-18 13:38:29 initdb: error: directory "/var/lib/postgresql/data" exists but is not empty 2026-01-18 13:38:29 If you want to create a new database system, either remove or empty 2026-01-18 13:38:29 the directory "/var/lib/postgresql/data" or run initdb 2026-01-18 13:38:29 with an argument other than "/var/lib/postgresql/data".

My .env file:

UPLOAD_LOCATION=./Data
DB_DATA_LOCATION=./Database

Bottom of docker compose:

  database:
    container_name: immich_postgres
    image: ghcr.io/immich-app/postgres:14-vectorchord0.3.0-pgvectors0.2.0
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      POSTGRES_INITDB_ARGS: '--data-checksums'
      DB_STORAGE_TYPE: 'HDD'
    volumes:
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
    restart: always

volumes:
  model-cache:
  pgdata: 
    external: true

Please help.

hollow karmaBOT
#

:wave: Hey @shy crag,

Thanks for reaching out to us. Please carefully read this message and follow the recommended actions. This will help us be more effective in our support effort and leave more time for building Immich immich.

References

#

Checklist

I have...

  1. :ballot_box_with_check: verified I'm on the latest release(note that mobile app releases may take some time).
  2. :ballot_box_with_check: read applicable release notes.
  3. :ballot_box_with_check: reviewed the FAQs for known issues.
  4. :ballot_box_with_check: reviewed Github for known issues.
  5. :ballot_box_with_check: tried accessing Immich via local ip (without a custom reverse proxy).
  6. :ballot_box_with_check: uploaded the relevant information (see below).
  7. :ballot_box_with_check: tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable

(an item can be marked as "complete" by reacting with the appropriate number)

Information

In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider:

  • Your docker-compose.yml and .env files.
  • Logs from all the containers and their status (see above).
  • All the troubleshooting steps you've tried so far.
  • Any recent changes you've made to Immich or your system.
  • Details about your system (both software/OS and hardware).
  • Details about your storage (filesystems, type of disks, output of commands like fdisk -l and df -h).
  • The version of the Immich server, mobile app, and other relevant pieces.
  • Any other information that you think might be relevant.

Please paste files and logs with proper code formatting, and especially avoid blurry screenshots.
Without the right information we can't work out what the problem is. Help us help you ;)

If this ticket can be closed you can use the /close command, and re-open it later if needed.

hollow karmaBOT
shy crag
#

More relevant context: I'm on a windows machine.

soft tulip
#

How did you update? Share the exact steps

shy crag
#

I did the image update, then ran regular commands, i.e. docker compose pull; docker compose up -d

#

then I had to restart because I was running into permissions issues. Happens from what I undersatnd when running on windows

soft tulip
#

It's important you first upgrade to 133, then 136, then you can go to latest

#

For every update you need to use the compose provided in the release

#

Amended for your pgdata volume of course

shy crag
#

Maybe I'm misunderstanding something. I did update docker compose yaml. But you're saying I need to pull things for an exact version at 133? Let me find how to do that..

torpid fiber
#

Yep, you haven’t properly re configured the pgdata volume

soft tulip
#

you put IMMICH_VERSION=v1.133.0 in your env file

shy crag
#

pgdata volume... let me look into that, too

#

I don't see anything about pgdata in the release notes.

soft tulip
torpid fiber
#

You have volumes: pgdata in your compose. But you aren’t using that in the database service

#

You’ve blindly copied from the new compose without applying the changes specific to your system

#

Please compare your old and new compose side by side to find any needed changes

shy crag
#

No, I modified in place. I never did the pgdata thing.

torpid fiber
#

Got it. Well you probably need one now - it’s generally necessary on windows

shy crag
#

Ok. Is there any risk to the data?

torpid fiber
#

Yes there could be. You always want to make sure to have good backups before you do system maintenance

shy crag
#

Oh, it worked!! Thank you! Will go up to 136 then 137. Will open a new thread if run into issues. Have a great day!