Permission Denied for 'pg_stat_tmp/pgstat.tmp' on Windows server 2003 - postgresql 8.4.6

From: Brian Fehrle <brianf(at)consistentstate(dot)com>
To: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Permission Denied for 'pg_stat_tmp/pgstat.tmp' on Windows server 2003 - postgresql 8.4.6
Date: 2011-05-11 22:54:09
Message-ID: 4DCB1391.8090007@consistentstate.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Wells Oliver 2011-05-12 01:52:10 Dump/restore casts
Previous Message Kevin Grittner 2011-05-11 22:33:33 Re: When does postgres set the connection state back to idle?