Postgress: could not open temporary statistics file "pg_stat_tmp/global.tmp": Input/output error

Postgres enters an I/O state trouble. This has happened before where the only solution is to remove power to the PI and then restart. Cannot stop or kill the docker container running it as demonstrated below

2025-11-30 05:01:15.066 GMT [1] LOG:  skipping missing configuration file "/var/lib/postgresql/data/postgresql.override.conf"
2025-11-30 05:01:15.067 GMT [1] LOG:  skipping missing configuration file "/var/lib/postgresql/data/postgresql.override.conf"
2025-11-30 05:01:20.495 UTC [1] LOG:  starting PostgreSQL 14.17 (Debian 14.17-1.pgdg120+1) on aarch64-unknown-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
2025-11-30 05:01:20.508 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2025-11-30 05:01:20.508 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2025-11-30 05:01:20.651 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2025-11-30 05:01:20.679 UTC [16] LOG:  database system was shut down at 2025-11-30 05:00:05 UTC
2025-11-30 05:01:21.033 UTC [1] LOG:  database system is ready to accept connections
2025-12-01 16:30:52.000 UTC [24] LOG:  could not open temporary statistics file "pg_stat_tmp/global.tmp": Input/output error
2025-12-01 16:30:52.643 UTC [24] LOG:  could not open temporary statistics file "pg_stat_tmp/global.tmp": Input/output error
2025-12-01 16:30:52.643 UTC [24] LOG:  could not open temporary statistics file "pg_stat_tmp/global.tmp": Input/output error
2025-12-01 16:30:53.287 UTC [24] LOG:  could not open temporary statistics file "pg_stat_tmp/global.tmp": Input/output error
2025-12-01 16:30:53.287 UTC [24] LOG:  could not open temporary statistics file "pg_stat_tmp/global.tmp": Input/output error
2025-12-01 16:30:53.933 UTC [24] LOG:  could not open temporary statistics file "pg_stat_tmp/global.tmp": Input/output error


❯ docker stop immich_postgres
Error response from daemon: cannot stop container: immich_postgres: tried to kill container, but did not receive an exit event
Was this page helpful?