docker-postgresql
docker-postgresql copied to clipboard
"Corrupted statistics file" errors
I'm running version 9.5-2 of this container on Docker 1.12.1 on Linux, and eventually it starts outputting lots of errors about files in its data volume.
Here are the kind of errors I get:
db_1 | WARNING: corrupted statistics file "pg_stat_tmp/global.stat"
db_1 | WARNING: corrupted statistics file "pg_stat_tmp/global.stat"
db_1 | WARNING: corrupted statistics file "pg_stat_tmp/global.stat"
db_1 | LOG: could not rename temporary statistics file "pg_stat_tmp/db_0.tmp" to "pg_stat_tmp/db_0.stat": No such file or directory
db_1 | LOG: could not rename temporary statistics file "pg_stat_tmp/global.tmp" to "pg_stat_tmp/global.stat": No such file or directory
Here's the docker-compose configuration that launches it:
db:
restart: always
image: sameersbn/postgresql:9.5-2
expose:
- "5432"
environment:
- DEBUG=false
- PG_TRUST_LOCALNET=true
- DB_NAME=conceptnet5
volumes:
- /bigdrive/conceptnet5.5/postgresql:/var/lib/postgresql
Once this happens, if I shut down the container, it never comes back up.
I get this message:
pg_ctl: could not start server
Examine the log output.
...but there is no log output. The container's /var/log/postgresql/postgresql-9.5-main.log is empty.
This sounds like a permissions error to me, and is likely related to UID/GID mapping. Do you know if there are any other postgres containers, or postgres, running on your host?
Try setting the UID/GID mapping env variables and see what happens.