سؤال

This is a problem using stats(), or just when calculating the database size. Using postgresql in windows 7, localhost.

The problem after doing this is:

"could not stat file "base/17436/119145": Permission denied"

I spent a lot of time trying to fix this problem, until i realise what is really the problem about.

So i'm going to answer myself.

هل كانت مفيدة؟

المحلول

This could be for 2 reasons:

-User of database (login role) without enough permissions.

In this case, check if the user, for example "postgres", have all the controls and privileges active.

-If localhost, check your antivirus, Twice.

Statistics made by postgresql might be considered as a virus movement by many antiviruses (ESET in my case), is a false positive, the only solution is to locate the directory of the database (like \PostgreSQL\9.3\data) and create am exception to that directory in your antivirus software.

As you can see, this second option is not related to the database code it self.

Hope this help you.

نصائح أخرى

In my case (as @JB suggested) restarting the PostgreSQL service will work in some instances.

in my case I got this error after broke an "reindexdb.exe database" command with Ctrl-C. I was running it on Windows 7 command prompt. Stop-Start of the PostgreSQL service solved the problem.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top