feat(deployment): add shm_size for PG (#19472)

This commit is contained in:
Matthew Momjian 2025-06-25 15:38:37 -04:00 committed by GitHub
parent 5f76cdddc7
commit 2a8019726c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 5 additions and 2 deletions

View File

@ -134,6 +134,7 @@ services:
- ${UPLOAD_LOCATION}/postgres:/var/lib/postgresql/data - ${UPLOAD_LOCATION}/postgres:/var/lib/postgresql/data
ports: ports:
- 5432:5432 - 5432:5432
shm_size: 128mb
# set IMMICH_TELEMETRY_INCLUDE=all in .env to enable metrics # set IMMICH_TELEMETRY_INCLUDE=all in .env to enable metrics
# immich-prometheus: # immich-prometheus:
# container_name: immich_prometheus # container_name: immich_prometheus

View File

@ -75,6 +75,7 @@ services:
- ${UPLOAD_LOCATION}/postgres:/var/lib/postgresql/data - ${UPLOAD_LOCATION}/postgres:/var/lib/postgresql/data
ports: ports:
- 5432:5432 - 5432:5432
shm_size: 128mb
restart: always restart: always
# set IMMICH_TELEMETRY_INCLUDE=all in .env to enable metrics # set IMMICH_TELEMETRY_INCLUDE=all in .env to enable metrics

View File

@ -67,6 +67,7 @@ services:
volumes: 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 # 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 - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
shm_size: 128mb
restart: always restart: always
volumes: volumes:

View File

@ -458,7 +458,7 @@ A result of `on` means that checksums are enabled.
<summary>Check if checksums are enabled</summary> <summary>Check if checksums are enabled</summary>
```bash ```bash
docker exec -it immich_postgres psql --dbname=postgres --username=<DB_USERNAME> --command="show data_checksums" docker exec -it immich_postgres psql --dbname=postgres --username=postgres --command="show data_checksums"
data_checksums data_checksums
---------------- ----------------
on on
@ -473,7 +473,7 @@ If checksums are enabled, you can check the status of the database with the foll
<summary>Check for database corruption</summary> <summary>Check for database corruption</summary>
```bash ```bash
docker exec -it immich_postgres psql --dbname=postgres --username=<DB_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 datname | checksum_failures | checksum_last_failure
-----------+-------------------+----------------------- -----------+-------------------+-----------------------
postgres | 0 | postgres | 0 |