pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Brian Fehrle <brianf@consistentstate.com>
To: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Permission Denied for 'pg_stat_tmp/pgstat.tmp' on Windows server 2003 - postgresql 8.4.6
Date: Wed, 11 May 2011 16:54:09 -0600
Message-ID: <4DCB1391.8090007@consistentstate.com> (raw)

Hi list,
     I've been doing a ton of searching on this issue, but haven't found 
any information as to why I'm getting this error, and I'm convinced this 
is an issue with Windows Server 2003 (or the antivirus), but thought I'd 
try my luck here to see if anyone has seen this problem and knows a fix. 
Unfortunately, moving off of windows onto a real OS isn't an option, so 
I need to make due with what I have.

PostgreSQL version: 8.4.6
OS: Windows Server 2003 Web Edition, Service Pack 2 (sorry)
Disk File System: NTFS


In my PostgreSQL server log, I am receiving tons of the following line:
2011-05-11 18:24:30 EDT LOG:  could not open temporary statistics file 
"pg_stat_tmp/pgstat.tmp": Permission denied

And by tons, I mean several hundred per minute. This is odd because the 
file was created by the administrator account, and the database is 
running as the administrator account.

When I try to look at the pg_stat_tmp/pgstat.tmp file's in the windows 
properties GUI, the "security" tab that should be there is nonexistent. 
It's there for any other file, and allows me to set permissions and 
ownerships of the file, but for this one it's gone.

If I reboot the entire machine, this file is no longer locked down like 
this. I've verified that the file can be accessed, is owned by 
administrator and allows all privileges to the administrator account 
before I start the database. When I start the database, everything looks 
fine, however within about half an hour, the log file prints out more 
"permission denied" lines and the security tab in the files properties 
disappears.

This behavior has happened to two other files on this server, neither of 
which had anything to do with the postgres cluster, so I don't think 
it's bound to just the contents of my postgresql data directory.

I have set up the antivirus (immunet 3.0 - clamav, only one i could find 
that would run on a server version of windows for free) to ignore these 
directories and files, however I'm unsure how I could verify that it's 
indeed ignoring these files, or if it is mucking around with them.

This is just one issue of many I have been having while running 
postgresql on Windows Server 2003 (none of them postgres's fault), but 
it's the main one that I haven't developed a workaround for yet. Any 
suggestions, or helpful info is greatly appreciated.

- Brian F



view thread (2+ messages)  latest in thread

Message-ID: <4DCB1391.8090007@consistentstate.com>
Permalink:  ../4DCB1391.8090007@consistentstate.com/
Also on:    postgresql.org/message-id/4DCB1391.8090007@consistentstate.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: brianf@consistentstate.com
  Subject: Re: Permission Denied for 'pg_stat_tmp/pgstat.tmp' on Windows server 2003 - postgresql 8.4.6
  In-Reply-To: <4DCB1391.8090007@consistentstate.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox