From 2a8019726c7a54c93eccc21e6681e62a89986be0 Mon Sep 17 00:00:00 2001 From: Matthew Momjian <50788000+mmomjian@users.noreply.github.com> Date: Wed, 25 Jun 2025 15:38:37 -0400 Subject: [PATCH] feat(deployment): add shm_size for PG (#19472) --- docker/docker-compose.dev.yml | 1 + docker/docker-compose.prod.yml | 1 + docker/docker-compose.yml | 1 + docs/docs/FAQ.mdx | 4 ++-- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docker/docker-compose.dev.yml b/docker/docker-compose.dev.yml index f44f8dae05..0694bf57f2 100644 --- a/docker/docker-compose.dev.yml +++ b/docker/docker-compose.dev.yml @@ -134,6 +134,7 @@ services: - ${UPLOAD_LOCATION}/postgres:/var/lib/postgresql/data ports: - 5432:5432 + shm_size: 128mb # set IMMICH_TELEMETRY_INCLUDE=all in .env to enable metrics # immich-prometheus: # container_name: immich_prometheus diff --git a/docker/docker-compose.prod.yml b/docker/docker-compose.prod.yml index 18348620ca..b293260555 100644 --- a/docker/docker-compose.prod.yml +++ b/docker/docker-compose.prod.yml @@ -75,6 +75,7 @@ services: - ${UPLOAD_LOCATION}/postgres:/var/lib/postgresql/data ports: - 5432:5432 + shm_size: 128mb restart: always # set IMMICH_TELEMETRY_INCLUDE=all in .env to enable metrics diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index c9ddee2a62..95d375ccd6 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -67,6 +67,7 @@ services: 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 + shm_size: 128mb restart: always volumes: diff --git a/docs/docs/FAQ.mdx b/docs/docs/FAQ.mdx index 24aa8e5d1b..906d9fd355 100644 --- a/docs/docs/FAQ.mdx +++ b/docs/docs/FAQ.mdx @@ -458,7 +458,7 @@ A result of `on` means that checksums are enabled. Check if checksums are enabled ```bash -docker exec -it immich_postgres psql --dbname=postgres --username= --command="show data_checksums" +docker exec -it immich_postgres psql --dbname=postgres --username=postgres --command="show data_checksums" data_checksums ---------------- on @@ -473,7 +473,7 @@ If checksums are enabled, you can check the status of the database with the foll Check for database corruption ```bash -docker exec -it immich_postgres psql --dbname=postgres --username= --command="SELECT datname, checksum_failures, checksum_last_failure FROM pg_stat_database WHERE datname IS NOT NULL" +docker exec -it immich_postgres psql --dbname=postgres --username=postgres --command="SELECT datname, checksum_failures, checksum_last_failure FROM pg_stat_database WHERE datname IS NOT NULL" datname | checksum_failures | checksum_last_failure -----------+-------------------+----------------------- postgres | 0 |