Re: could not rename temporary statistics file "/run/shm/pgstat.tmp" to "/run/shm/pgstat.stat": No such file or directory

From: basti <mailinglist(at)unix-solution(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: could not rename temporary statistics file "/run/shm/pgstat.tmp" to "/run/shm/pgstat.stat": No such file or directory
Date: 2014-04-22 14:11:38
Message-ID: 5356789A.1010807@unix-solution.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.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"?
>
> Postgres does not have permissions on the directory. Give Postgres
> permissions on the directory.
>
>>
>> Regards,
>> Basti
>>
>>
>>
>>
>>
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Torsten Förtsch 2014-04-22 14:25:35 Re: Is this a planner bug?
Previous Message Adrian Klaver 2014-04-22 13:36:40 Re: could not rename temporary statistics file "/run/shm/pgstat.tmp" to "/run/shm/pgstat.stat": No such file or directory