PERMISSION ISSUE WITH EXTERNAL POSTGRES #2259

Closed
opened 2026-02-05 05:54:24 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @HHUBSS on GitHub (Feb 25, 2024).

The bug

Hi, I'm upgrading from v1.94.1 to v1.95.1. I follow the upgrade process but there is a problem with my postgres and immich can't start.

image

I have external postgres instance and I changed it from "tensorchord/pgvecto-rs:pg15-v0.1.11" to "tensorchord/pgvecto-rs:pg15-v0.2.0". I tried to run the commands manually but I got this error:

NOTICE:  schema "vectors" already exists, skipping
CREATE SCHEMA

ALTER DATABASE
SET
UPDATE 1

UPDATE 1

ALTER EXTENSION

UPDATE 1

ERROR:  type "vecf16" already exists
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ROLLBACK

I tried to restart the postgres container as advise by @LucaDev here but still get the error above(screenshot). I had to roll back my postgres to v0.1.11 and immich to v1.94.1 for now. I forgot to screenshot the error from immich server since I rolled back.

Can you help me with my issue please?

The OS that Immich Server is running on

Unraid 6.12.8

Version of Immich Server

v1.95.1

Version of Immich Mobile App

v1.95.0

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

version: "3.8"

name: immich

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    command: [ "start.sh", "immich" ]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
      - /mnt/user/Pictures/Album:/mnt/ext_album:ro
    env_file:
      - .env
    ports:
      - 2283:3001
    depends_on:
      - redis
      - database
    restart: always

  immich-microservices:
    container_name: immich_microservices
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    extends:
      file: hwaccel.yml
      service: hwaccel
    command: [ "start.sh", "microservices" ]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
      - /mnt/user/Pictures/Album:/mnt/ext_album:ro
    env_file:
      - .env
    depends_on:
      - redis
      - database
    restart: always

  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always

  redis:
    container_name: immich_redis
    image: redis:6.2-alpine@sha256:3995fe6ea6a619313e31046bd3c8643f9e70f8f2b294ff82659d409b47d06abb
    restart: always

  database:
    container_name: immich_postgres
    image: tensorchord/pgvecto-rs:pg15-v0.2.0
    env_file:
      - .env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - pgdata:/var/lib/postgresql/data
    restart: always

volumes:
  pgdata:
  model-cache:

Your .env content

# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables

# The location where your uploaded files are stored
UPLOAD_LOCATION=/mnt/user/Pictures/Mobile Photos/

# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=release

# Connection secrets for postgres and typesense. You should change these to random passwords
# TYPESENSE_API_KEY=<REMOVED FOR GITHUB>
# DB_PASSWORD=<REMOVED FOR GITHUB>

# The values below this line do not need to be changed
###################################################################################
DB_HOSTNAME=<REMOVED FOR GITHUB>
DB_PORT=<REMOVED FOR GITHUB>
DB_USERNAME=<REMOVED FOR GITHUB>
DB_PASSWORD=<REMOVED FOR GITHUB>
DB_DATABASE_NAME=<REMOVED FOR GITHUB>

REDIS_HOSTNAME=<REMOVED FOR GITHUB>
REDIS_PORT=<REMOVED FOR GITHUB>

Reproduction steps

1. Setup external postgres and set image to tensorchord/pgvecto-rs:pg15-v0.2.0
2. Update immich
3. Run command manually as stated when Immich doesn't have superuser permissions

Additional information

No response

Originally created by @HHUBSS on GitHub (Feb 25, 2024). ### The bug Hi, I'm upgrading from v1.94.1 to v1.95.1. I follow the upgrade process but there is a problem with my postgres and immich can't start. ![image](https://github.com/immich-app/immich/assets/89816305/7900e46d-9cfe-4e5b-bf51-f0572f586f84) I have external postgres instance and I changed it from "tensorchord/pgvecto-rs:pg15-v0.1.11" to "tensorchord/pgvecto-rs:pg15-v0.2.0". I tried to run the commands manually but I got this error: ``` NOTICE: schema "vectors" already exists, skipping CREATE SCHEMA ALTER DATABASE SET UPDATE 1 UPDATE 1 ALTER EXTENSION UPDATE 1 ERROR: type "vecf16" already exists ERROR: current transaction is aborted, commands ignored until end of transaction block ROLLBACK ``` I tried to restart the postgres container as advise by @LucaDev [here](https://github.com/immich-app/immich/issues/7327#issuecomment-1959696574) but still get the error above(screenshot). I had to roll back my postgres to v0.1.11 and immich to v1.94.1 for now. I forgot to screenshot the error from immich server since I rolled back. Can you help me with my issue please? ### The OS that Immich Server is running on Unraid 6.12.8 ### Version of Immich Server v1.95.1 ### Version of Immich Mobile App v1.95.0 ### Platform with the issue - [X] Server - [ ] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML version: "3.8" name: immich services: immich-server: container_name: immich_server image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} command: [ "start.sh", "immich" ] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload - /etc/localtime:/etc/localtime:ro - /mnt/user/Pictures/Album:/mnt/ext_album:ro env_file: - .env ports: - 2283:3001 depends_on: - redis - database restart: always immich-microservices: container_name: immich_microservices image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} extends: file: hwaccel.yml service: hwaccel command: [ "start.sh", "microservices" ] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload - /etc/localtime:/etc/localtime:ro - /mnt/user/Pictures/Album:/mnt/ext_album:ro env_file: - .env depends_on: - redis - database restart: always immich-machine-learning: container_name: immich_machine_learning image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} volumes: - model-cache:/cache env_file: - .env restart: always redis: container_name: immich_redis image: redis:6.2-alpine@sha256:3995fe6ea6a619313e31046bd3c8643f9e70f8f2b294ff82659d409b47d06abb restart: always database: container_name: immich_postgres image: tensorchord/pgvecto-rs:pg15-v0.2.0 env_file: - .env environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} volumes: - pgdata:/var/lib/postgresql/data restart: always volumes: pgdata: model-cache: ``` ### Your .env content ```Shell # You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables # The location where your uploaded files are stored UPLOAD_LOCATION=/mnt/user/Pictures/Mobile Photos/ # The Immich version to use. You can pin this to a specific version like "v1.71.0" IMMICH_VERSION=release # Connection secrets for postgres and typesense. You should change these to random passwords # TYPESENSE_API_KEY=<REMOVED FOR GITHUB> # DB_PASSWORD=<REMOVED FOR GITHUB> # The values below this line do not need to be changed ################################################################################### DB_HOSTNAME=<REMOVED FOR GITHUB> DB_PORT=<REMOVED FOR GITHUB> DB_USERNAME=<REMOVED FOR GITHUB> DB_PASSWORD=<REMOVED FOR GITHUB> DB_DATABASE_NAME=<REMOVED FOR GITHUB> REDIS_HOSTNAME=<REMOVED FOR GITHUB> REDIS_PORT=<REMOVED FOR GITHUB> ``` ### Reproduction steps ```bash 1. Setup external postgres and set image to tensorchord/pgvecto-rs:pg15-v0.2.0 2. Update immich 3. Run command manually as stated when Immich doesn't have superuser permissions ``` ### Additional information _No response_
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#2259