could not rename temporary statistics file "/run/shm/pgstat.tmp" to "/run/shm/pgstat.stat": No such file or directory
Hello,
since I have enabled "stats_temp_directory = '/run/shm'" in
/etc/postgresql/9.1/main/postgresql.conf I get the following error:
2014-04-21 02:37:29 CEST LOG: could not rename temporary statistics
file "/run/shm/pgstat.tmp" to "/run/shm/pgstat.stat": No such file or
directory
/var/run/shm# ls -rtl
-rw------- 1 postgres postgres 312211 Apr 22 11:31 pgstat.stat
There is no "/run/shm/pgstat.tmp" file but if I create it and change the
owner to postgres the file will be removed few minutes later.
How can explain and how can I solve this "error"?
Regards,
Basti
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Hello,
since I have enabled "stats_temp_directory = '/run/shm'" in
/etc/postgresql/9.1/main/postgresql.conf I get the following error:
2014-04-21 02:37:29 CEST LOG: could not rename temporary statistics
file "/run/shm/pgstat.tmp" to "/run/shm/pgstat.stat": No such file or
directory
/var/run/shm# ls -rtl
-rw------- 1 postgres postgres 312211 Apr 22 11:31 pgstat.stat
There is no "/run/shm/pgstat.tmp" file but if I create it and change the
owner to postgres the file will be removed few minutes later.
How can explain and how can I solve this "error"?
Regards,
Basti
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Seems you're using /run/shm and /var/run/shm by mistake.
Tomas
basti <mailinglist@unix-solution.de>napsal/a:
Hello,
since I have enabled "stats_temp_directory = '/run/shm'" in
/etc/postgresql/9.1/main/postgresql.conf I get the following error:2014-04-21 02:37:29 CEST LOG: could not rename temporary statistics
file "/run/shm/pgstat.tmp" to "/run/shm/pgstat.stat": No such file or
directory/var/run/shm# ls -rtl
-rw------- 1 postgres postgres 312211 Apr 22 11:31 pgstat.statThere is no "/run/shm/pgstat.tmp" file but if I create it and change the
owner to postgres the file will be removed few minutes later.How can explain and how can I solve this "error"?
Regards,
Basti--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Import Notes
Resolved by subject fallback
/run/shm and /var/run/shm would be the same. On my system I found no
symlink to each other but there is the same content.
Basti
On 22.04.2014 12:02, Tomáš Vondra wrote:
Seems you're using /run/shm and /var/run/shm by mistake.
Tomas
basti <mailinglist@unix-solution.de>napsal/a:
Hello,
since I have enabled "stats_temp_directory = '/run/shm'" in
/etc/postgresql/9.1/main/postgresql.conf I get the following error:2014-04-21 02:37:29 CEST LOG: could not rename temporary statistics
file "/run/shm/pgstat.tmp" to "/run/shm/pgstat.stat": No such file or
directory/var/run/shm# ls -rtl
-rw------- 1 postgres postgres 312211 Apr 22 11:31 pgstat.statThere is no "/run/shm/pgstat.tmp" file but if I create it and change the
owner to postgres the file will be removed few minutes later.How can explain and how can I solve this "error"?
Regards,
Basti--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
/run/shm and /var/run/shm would be the same. On my system I found no
symlink to each other but there is the same content.
Basti
On 22.04.2014 12:02, Tomáš Vondra wrote:
Seems you're using /run/shm and /var/run/shm by mistake.
Tomas
basti <mailinglist@unix-solution.de>napsal/a:
Hello,
since I have enabled "stats_temp_directory = '/run/shm'" in
/etc/postgresql/9.1/main/postgresql.conf I get the following error:2014-04-21 02:37:29 CEST LOG: could not rename temporary statistics
file "/run/shm/pgstat.tmp" to "/run/shm/pgstat.stat": No such file or
directory/var/run/shm# ls -rtl
-rw------- 1 postgres postgres 312211 Apr 22 11:31 pgstat.statThere is no "/run/shm/pgstat.tmp" file but if I create it and change the
owner to postgres the file will be removed few minutes later.How can explain and how can I solve this "error"?
Regards,
Basti--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On 04/22/2014 02:39 AM, basti wrote:
Hello,
since I have enabled "stats_temp_directory = '/run/shm'" in
/etc/postgresql/9.1/main/postgresql.conf I get the following error:2014-04-21 02:37:29 CEST LOG: could not rename temporary statistics
file "/run/shm/pgstat.tmp" to "/run/shm/pgstat.stat": No such file or
directory/var/run/shm# ls -rtl
-rw------- 1 postgres postgres 312211 Apr 22 11:31 pgstat.statThere is no "/run/shm/pgstat.tmp" file but if I create it and change the
owner to postgres the file will be removed few minutes later.How can explain and how can I solve this "error"?
Postgres does not have permissions on the directory. Give Postgres
permissions on the directory.
Regards,
Basti
--
Adrian Klaver
adrian.klaver@aklaver.com
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
When Postgres has no permission why "pgstat.stat" is created by postgres?
I have also try to create a file via su postgres -c "cd /run/shm/ &&
touch ...."
/run# ls -la shm
total 52
drwxrwxrwt 2 root root 100 Apr 22 16:09 .
drwxr-xr-x 20 root root 660 Apr 8 11:15 ..
-rw-r--r-- 1 postgres postgres 0 Apr 22 16:09
file_create_as_postgres_user
-rw------- 1 postgres postgres 52658 Apr 22 16:09 pgstat.stat
-rw-r--r-- 1 root root 0 Oct 19 2012 .tmpfs
/run# ls -rtl | grep shm
drwxrwxrwt 2 root root 80 Apr 22 16:02 shm
I think these permissions are enough.
Basti
On 22.04.2014 15:36, Adrian Klaver wrote:
On 04/22/2014 02:39 AM, basti wrote:
Hello,
since I have enabled "stats_temp_directory = '/run/shm'" in
/etc/postgresql/9.1/main/postgresql.conf I get the following error:2014-04-21 02:37:29 CEST LOG: could not rename temporary statistics
file "/run/shm/pgstat.tmp" to "/run/shm/pgstat.stat": No such file or
directory/var/run/shm# ls -rtl
-rw------- 1 postgres postgres 312211 Apr 22 11:31 pgstat.statThere is no "/run/shm/pgstat.tmp" file but if I create it and change the
owner to postgres the file will be removed few minutes later.How can explain and how can I solve this "error"?
Postgres does not have permissions on the directory. Give Postgres
permissions on the directory.Regards,
Basti
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On 04/22/2014 07:11 AM, basti wrote:
When Postgres has no permission why "pgstat.stat" is created by postgres?
I have also try to create a file via su postgres -c "cd /run/shm/ &&
touch ...."/run# ls -la shm
total 52
drwxrwxrwt 2 root root 100 Apr 22 16:09 .
drwxr-xr-x 20 root root 660 Apr 8 11:15 ..
-rw-r--r-- 1 postgres postgres 0 Apr 22 16:09
file_create_as_postgres_user
-rw------- 1 postgres postgres 52658 Apr 22 16:09 pgstat.stat
-rw-r--r-- 1 root root 0 Oct 19 2012 .tmpfs/run# ls -rtl | grep shm
drwxrwxrwt 2 root root 80 Apr 22 16:02 shmI think these permissions are enough.
What distribution are you running?
Is it possible you have something like SELinux enabled that is intervening?
What does the system log show when the Postgres server throws the error?
Basti
On 22.04.2014 15:36, Adrian Klaver wrote:
On 04/22/2014 02:39 AM, basti wrote:
Hello,
since I have enabled "stats_temp_directory = '/run/shm'" in
/etc/postgresql/9.1/main/postgresql.conf I get the following error:2014-04-21 02:37:29 CEST LOG: could not rename temporary statistics
file "/run/shm/pgstat.tmp" to "/run/shm/pgstat.stat": No such file or
directory/var/run/shm# ls -rtl
-rw------- 1 postgres postgres 312211 Apr 22 11:31 pgstat.statThere is no "/run/shm/pgstat.tmp" file but if I create it and change the
owner to postgres the file will be removed few minutes later.How can explain and how can I solve this "error"?
Postgres does not have permissions on the directory. Give Postgres
permissions on the directory.Regards,
Basti
--
Adrian Klaver
adrian.klaver@aklaver.com
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
I use Debian 7, Postgres 9.1, Kernel 3.2.0-3-amd64
Syslog says nothing about postgres during this time.
SELinux is not installed/active.
I also found this (2 hours later) in the postgres log:
2014-04-22 11:01:42 CEST LOG: could not open temporary statistics file
"/run/shm/pgstat.tmp": Permission denied
I don't understand what's going on there:
postgres@srv1:/home/postgresql_data/postgresql/9.1/main/pg_log$ date &&
ls -la /run/shm/
Tue Apr 22 17:08:41 CEST 2014
total 308
drwxrwxrwt 2 root root 80 Apr 22 17:08 .
drwxr-xr-x 20 root root 660 Apr 8 11:15 ..
-rw------- 1 postgres postgres 314577 Apr 22 17:08 pgstat.stat
-rw-r--r-- 1 root root 0 Oct 19 2012 .tmpfs
postgres@srv1:/home/postgresql_data/postgresql/9.1/main/pg_log$ touch
/run/shm/pgstat.tmp
postgres@srv1:/home/postgresql_data/postgresql/9.1/main/pg_log$ date &&
ls -la /run/shm/
Tue Apr 22 17:08:55 CEST 2014
total 308
drwxrwxrwt 2 root root 100 Apr 22 17:08 .
drwxr-xr-x 20 root root 660 Apr 8 11:15 ..
-rw------- 1 postgres postgres 314577 Apr 22 17:08 pgstat.stat
-rw-r--r-- 1 postgres postgres 0 Apr 22 17:08 pgstat.tmp
-rw-r--r-- 1 root root 0 Oct 19 2012 .tmpfs
postgres@srv1:/home/postgresql_data/postgresql/9.1/main/pg_log$ date &&
ls -la /run/shm/
Tue Apr 22 17:09:07 CEST 2014
total 52
drwxrwxrwt 2 root root 80 Apr 22 17:09 .
drwxr-xr-x 20 root root 660 Apr 8 11:15 ..
-rw------- 1 postgres postgres 52658 Apr 22 17:09 pgstat.stat
-rw-r--r-- 1 root root 0 Oct 19 2012 .tmpfs
postgres@srv1:/home/postgresql_data/postgresql/9.1/main/pg_log$
Basti
On 22.04.2014 16:32, Adrian Klaver wrote:
On 04/22/2014 07:11 AM, basti wrote:
When Postgres has no permission why "pgstat.stat" is created by postgres?
I have also try to create a file via su postgres -c "cd /run/shm/ &&
touch ...."/run# ls -la shm
total 52
drwxrwxrwt 2 root root 100 Apr 22 16:09 .
drwxr-xr-x 20 root root 660 Apr 8 11:15 ..
-rw-r--r-- 1 postgres postgres 0 Apr 22 16:09
file_create_as_postgres_user
-rw------- 1 postgres postgres 52658 Apr 22 16:09 pgstat.stat
-rw-r--r-- 1 root root 0 Oct 19 2012 .tmpfs/run# ls -rtl | grep shm
drwxrwxrwt 2 root root 80 Apr 22 16:02 shmI think these permissions are enough.
What distribution are you running?
Is it possible you have something like SELinux enabled that is intervening?
What does the system log show when the Postgres server throws the error?
Basti
On 22.04.2014 15:36, Adrian Klaver wrote:
On 04/22/2014 02:39 AM, basti wrote:
Hello,
since I have enabled "stats_temp_directory = '/run/shm'" in
/etc/postgresql/9.1/main/postgresql.conf I get the following error:2014-04-21 02:37:29 CEST LOG: could not rename temporary statistics
file "/run/shm/pgstat.tmp" to "/run/shm/pgstat.stat": No such file or
directory/var/run/shm# ls -rtl
-rw------- 1 postgres postgres 312211 Apr 22 11:31 pgstat.statThere is no "/run/shm/pgstat.tmp" file but if I create it and change
the
owner to postgres the file will be removed few minutes later.How can explain and how can I solve this "error"?
Postgres does not have permissions on the directory. Give Postgres
permissions on the directory.Regards,
Basti
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
I use Debian 7, Postgres 9.1, Kernel 3.2.0-3-amd64
Syslog says nothing about postgres during this time.
SELinux is not installed/active.
I also found this (2 hours later) in the postgres log:
2014-04-22 11:01:42 CEST LOG: could not open temporary statistics file
"/run/shm/pgstat.tmp": Permission denied
I don't understand what's going on there:
postgres@srv1:/home/postgresql_data/postgresql/9.1/main/pg_log$ date &&
ls -la /run/shm/
Tue Apr 22 17:08:41 CEST 2014
total 308
drwxrwxrwt 2 root root 80 Apr 22 17:08 .
drwxr-xr-x 20 root root 660 Apr 8 11:15 ..
-rw------- 1 postgres postgres 314577 Apr 22 17:08 pgstat.stat
-rw-r--r-- 1 root root 0 Oct 19 2012 .tmpfs
postgres@srv1:/home/postgresql_data/postgresql/9.1/main/pg_log$ touch
/run/shm/pgstat.tmp
postgres@srv1:/home/postgresql_data/postgresql/9.1/main/pg_log$ date &&
ls -la /run/shm/
Tue Apr 22 17:08:55 CEST 2014
total 308
drwxrwxrwt 2 root root 100 Apr 22 17:08 .
drwxr-xr-x 20 root root 660 Apr 8 11:15 ..
-rw------- 1 postgres postgres 314577 Apr 22 17:08 pgstat.stat
-rw-r--r-- 1 postgres postgres 0 Apr 22 17:08 pgstat.tmp
-rw-r--r-- 1 root root 0 Oct 19 2012 .tmpfs
postgres@srv1:/home/postgresql_data/postgresql/9.1/main/pg_log$ date &&
ls -la /run/shm/
Tue Apr 22 17:09:07 CEST 2014
total 52
drwxrwxrwt 2 root root 80 Apr 22 17:09 .
drwxr-xr-x 20 root root 660 Apr 8 11:15 ..
-rw------- 1 postgres postgres 52658 Apr 22 17:09 pgstat.stat
-rw-r--r-- 1 root root 0 Oct 19 2012 .tmpfs
postgres@srv1:/home/postgresql_data/postgresql/9.1/main/pg_log$
Basti
On 22.04.2014 16:32, Adrian Klaver wrote:
On 04/22/2014 07:11 AM, basti wrote:
When Postgres has no permission why "pgstat.stat" is created by postgres?
I have also try to create a file via su postgres -c "cd /run/shm/ &&
touch ...."/run# ls -la shm
total 52
drwxrwxrwt 2 root root 100 Apr 22 16:09 .
drwxr-xr-x 20 root root 660 Apr 8 11:15 ..
-rw-r--r-- 1 postgres postgres 0 Apr 22 16:09
file_create_as_postgres_user
-rw------- 1 postgres postgres 52658 Apr 22 16:09 pgstat.stat
-rw-r--r-- 1 root root 0 Oct 19 2012 .tmpfs/run# ls -rtl | grep shm
drwxrwxrwt 2 root root 80 Apr 22 16:02 shmI think these permissions are enough.
What distribution are you running?
Is it possible you have something like SELinux enabled that is intervening?
What does the system log show when the Postgres server throws the error?
Basti
On 22.04.2014 15:36, Adrian Klaver wrote:
On 04/22/2014 02:39 AM, basti wrote:
Hello,
since I have enabled "stats_temp_directory = '/run/shm'" in
/etc/postgresql/9.1/main/postgresql.conf I get the following error:2014-04-21 02:37:29 CEST LOG: could not rename temporary statistics
file "/run/shm/pgstat.tmp" to "/run/shm/pgstat.stat": No such file or
directory/var/run/shm# ls -rtl
-rw------- 1 postgres postgres 312211 Apr 22 11:31 pgstat.statThere is no "/run/shm/pgstat.tmp" file but if I create it and change
the
owner to postgres the file will be removed few minutes later.How can explain and how can I solve this "error"?
Postgres does not have permissions on the directory. Give Postgres
permissions on the directory.Regards,
Basti
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On 04/22/2014 08:13 AM, basti wrote:
I use Debian 7, Postgres 9.1, Kernel 3.2.0-3-amd64
Syslog says nothing about postgres during this time.
SELinux is not installed/active.I also found this (2 hours later) in the postgres log:
2014-04-22 11:01:42 CEST LOG: could not open temporary statistics file
"/run/shm/pgstat.tmp": Permission deniedI don't understand what's going on there:
postgres@srv1:/home/postgresql_data/postgresql/9.1/main/pg_log$ date &&
ls -la /run/shm/
Tue Apr 22 17:08:41 CEST 2014
total 308
drwxrwxrwt 2 root root 80 Apr 22 17:08 .
drwxr-xr-x 20 root root 660 Apr 8 11:15 ..
-rw------- 1 postgres postgres 314577 Apr 22 17:08 pgstat.stat
-rw-r--r-- 1 root root 0 Oct 19 2012 .tmpfs
postgres@srv1:/home/postgresql_data/postgresql/9.1/main/pg_log$ touch
/run/shm/pgstat.tmp
postgres@srv1:/home/postgresql_data/postgresql/9.1/main/pg_log$ date &&
ls -la /run/shm/
Tue Apr 22 17:08:55 CEST 2014
total 308
drwxrwxrwt 2 root root 100 Apr 22 17:08 .
drwxr-xr-x 20 root root 660 Apr 8 11:15 ..
-rw------- 1 postgres postgres 314577 Apr 22 17:08 pgstat.stat
-rw-r--r-- 1 postgres postgres 0 Apr 22 17:08 pgstat.tmp
-rw-r--r-- 1 root root 0 Oct 19 2012 .tmpfs
postgres@srv1:/home/postgresql_data/postgresql/9.1/main/pg_log$ date &&
ls -la /run/shm/
Tue Apr 22 17:09:07 CEST 2014
total 52
drwxrwxrwt 2 root root 80 Apr 22 17:09 .
drwxr-xr-x 20 root root 660 Apr 8 11:15 ..
-rw------- 1 postgres postgres 52658 Apr 22 17:09 pgstat.stat
-rw-r--r-- 1 root root 0 Oct 19 2012 .tmpfs
postgres@srv1:/home/postgresql_data/postgresql/9.1/main/pg_log$
Hmm, not sure what is going on.
Some thoughts.
Is there more than one instance of Postgres on this machine and could
there be a conflict?
What happens if you point at another directory?
Basti
--
Adrian Klaver
adrian.klaver@aklaver.com
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On 22 April 2014 17:13, basti <mailinglist@unix-solution.de> wrote:
2014-04-22 11:01:42 CEST LOG: could not open temporary statistics file
"/run/shm/pgstat.tmp": Permission deniedI don't understand what's going on there:
postgres@srv1:/home/postgresql_data/postgresql/9.1/main/pg_log$ date &&
ls -la /run/shm/
Tue Apr 22 17:08:41 CEST 2014
total 308
drwxrwxrwt 2 root root 80 Apr 22 17:08 .
drwxr-xr-x 20 root root 660 Apr 8 11:15 ..
-rw------- 1 postgres postgres 314577 Apr 22 17:08 pgstat.stat
-rw-r--r-- 1 root root 0 Oct 19 2012 .tmpfs
postgres@srv1:/home/postgresql_data/postgresql/9.1/main/pg_log$ touch
/run/shm/pgstat.tmp
Is the postgres instance that is complaining really running as user postgres?
If you happen to have multiple postgres instances, chances are that
one is running as some user other than postgres. That would explain
why it can't modify those files.
--
If you can't see the forest for the trees,
Cut the trees and you'll see there is no forest.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general