Обсуждение: pgstat wait timeout : permission denied
Hi All my configuration: (-) postgres 9.1 (-) windows 2003 (-) 4 Xeon CPUs (-) 16GB of RAM I'm getting a lot of errors in my postgres log file: ------------------------------- 2012-06-19 09:31:06 CESTLOCATION: backend_read_statsfile, .\src\backend\postmaster\pgstat.c:3807 2012-06-19 09:31:38 CESTWARNING: 01000: pgstat wait timeout 2012-06-19 09:31:38 CESTLOCATION: backend_read_statsfile, .\src\backend\postmaster\pgstat.c:3807 2012-06-19 09:31:58 CESTWARNING: 01000: pgstat wait timeout 2012-06-19 09:31:58 CESTLOCATION: backend_read_statsfile, .\src\backend\postmaster\pgstat.c:3807 2012-06-19 09:32:58 CESTWARNING: 01000: pgstat wait timeout 2012-06-19 09:32:58 CESTLOCATION: backend_read_statsfile, .\src\backend\postmaster\pgstat.c:3807 2012-06-19 09:33:38 CESTWARNING: 01000: pgstat wait timeout 2012-06-19 09:33:38 CESTLOCATION: backend_read_statsfile, .\src\backend\postmaster\pgstat.c:3807 2012-06-19 09:33:41 CESTLOG: 42501: could not rename temporary statistics file "pg_stat_tmp/pgstat.tmp" to "pg_stat_tmp/pgstat.stat": Permission denied ------------------------------- and that's really odd: I mean, when postgres starts, it creates the file pg_stat_tmp/pgstat.stat, so it means that it has all the permissions to access to that folder. But, nevertheless, after some time it shows the error above. And these are repeadtly shown in the postgres log file. Tried to change the folder/file permissions to "everyone full control", but nothing changes. Do you have some hints/idea? Thanks in advance -- View this message in context: http://postgresql.1045698.n5.nabble.com/pgstat-wait-timeout-permission-denied-tp5713236.html Sent from the PostgreSQL - general mailing list archive at Nabble.com.
> 2012-06-19 09:33:38 CESTWARNING: 01000: pgstat wait timeout > 2012-06-19 09:33:38 CESTLOCATION: backend_read_statsfile, > .\src\backend\postmaster\pgstat.c:3807 > 2012-06-19 09:33:41 CESTLOG: 42501: could not rename temporary statistics > file "pg_stat_tmp/pgstat.tmp" to "pg_stat_tmp/pgstat.stat": Permission > denied That looks like anti-virus software getting in the way. -- If you can't see the forest for the trees, Cut the trees and you'll see there is no forest.
hmm, interesting idea. I'll check, it will be a bit difficult because it is centrally managed by administrators, but I will see how to temporary disable it. Thanks -- View this message in context: http://postgresql.1045698.n5.nabble.com/pgstat-wait-timeout-permission-denied-tp5713236p5713255.html Sent from the PostgreSQL - general mailing list archive at Nabble.com.
2012/6/19 Alban Hertroys <haramrae@gmail.com>: >> 2012-06-19 09:33:38 CESTWARNING: 01000: pgstat wait timeout >> 2012-06-19 09:33:38 CESTLOCATION: backend_read_statsfile, >> .\src\backend\postmaster\pgstat.c:3807 >> 2012-06-19 09:33:41 CESTLOG: 42501: could not rename temporary statistics >> file "pg_stat_tmp/pgstat.tmp" to "pg_stat_tmp/pgstat.stat": Permission >> denied > > That looks like anti-virus software getting in the way. Or the Windows Firewall. regards -- Dickson S. Guedes mail/xmpp: guedes@guedesoft.net - skype: guediz http://guedesoft.net - http://www.postgresql.org.br
Hi all just to close the post and let you know: it was the antivirus (McAfee). Now I have to see how to create an exception on this folder, because of course I would keep the antivirus running. Thanks Alban for the hint. Regards -- View this message in context: http://postgresql.1045698.n5.nabble.com/pgstat-wait-timeout-permission-denied-tp5713236p5713509.html Sent from the PostgreSQL - general mailing list archive at Nabble.com.
On 06/20/2012 08:31 PM, pandorino wrote: > Hi all > just to close the post and let you know: it was the antivirus (McAfee). > Now I have to see how to create an exception on this folder, because of > course I would keep the antivirus running. > You'll probably also want to set an exception on the folder with the PostgreSQL executables etc in it (by default it contains the datadir, but not always, so may need to be set separately), *AND* set an exception for the postmaster and postgres.exe executables. -- Craig Ringer
Hi Craig yes, that's exactly what I did. I have the datadir in a different folder than the executable (because I created a pseudo-portable "database"). I have not set any special exception for the executables, apparently my installation does not need this. Everything is working fine now, however, should I experience in the future a similar problem, at least I know what to look for... In any case, very odd. Thanks to all Regards -- View this message in context: http://postgresql.1045698.n5.nabble.com/pgstat-wait-timeout-permission-denied-tp5713236p5714173.html Sent from the PostgreSQL - general mailing list archive at Nabble.com.
On 06/26/2012 12:27 AM, pandorino wrote: > Hi Craig > yes, that's exactly what I did. I have the datadir in a different folder > than the executable (because I created a pseudo-portable "database"). I > have not set any special exception for the executables, apparently my > installation does not need this. > Everything is working fine now, however, should I experience in the future a > similar problem, at least I know what to look for... > In any case, very odd. Not much Windows software has multiple processes opening and closing the same files all the time. It's clear that lots of antivirus software has race conditions and bugs related to its file access interception, and Pg appears to be particularly good at triggering them. -- Craig Ringer