-
Notifications
You must be signed in to change notification settings - Fork 1.2k
WARNING: could not open statistics file "pg_stat_tmp/global.stat": Operation not permitted #1015
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I found how to list all the processes. That looks normal:
So, it now appears to be a Docker issue... ??? |
I am having similar issues, lots of permission errors or file not found. |
Docker version 20.10.17, build 100c701 |
Almost the same: Docker version 20.10.17, build 100c70180f |
Docker Desktop 4.2.0 running Docker Engine v20.10.10 should not have this issue |
My guess is that this has something to do with the filesystem sharing implementation in Docker Desktop -- beyond that, I'm at a loss for helping debug (as this doesn't seem to be something particular to PostgreSQL but rather to the environment in which it's running or storing data). |
Still seeing it on Docker Desktop 4.2.1 (20.10.21, baeda1f) for Mac (M1), |
We also had this issue. Container is deployed using saltstack and shared directory owner was set to |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This is still my best guess -- can anyone who is suffering from this reproduce with a named volume or without using Docker Desktop / VM shared filesystems? |
I switched to using an external volume in my compose file and I've not seen the problem since. I agree that this doesn't seem to be Postgres specific but it seems to be the only one getting hit by whatever the bug is. I'm fine with closing this. |
There are at least three instances of this problem coming up:
What I found can be seen here
In brief, somehow files inside the container are being owned by root. While attached to the db container, I see this:
I have done
chown -R postgres:postgres /var/lib/postgresql
but later the Warnings start up again and when I attach to the db container, I see that more files are owned by root.I'm assuming that this is not suppose to happen and also assuming that this is part of the problem. I tried adding
ps
to the container but I still can't see the processes started by docker compose.The text was updated successfully, but these errors were encountered: