I have information We had noticed two relations, their numbers being 16384/16642 and 16384/16792. Here is what pg_class has for them. "relname";"relnamespace";"reltype";"relowner";"relam";"relfilenode";"reltablespace";"relpages";"reltuples";"reltoastrelid";"reltoastidxid";"relhasindex";"relisshared";"relistemp";"relkind";"relnatts";"relchecks";"relhasoids";"relhaspkey";"relhasrules";"relhastriggers";"relhassubclass";"relfrozenxid";"relacl";"reloptions" "pg_toast_16638";99;16643;16510;0;16642;0;0;0;0;16644;t;f;f;"t";3;0;f;t;f;f;f;1581;"";"" "pg_toast_16788";99;16793;16510;0;16792;0;0;0;0;16794;t;f;f;"t";3;0;f;t;f;f;f;2202;"";"" We also looked at the permissions and whether the files actually exist. Findings: The files are both marked "system file" and have size 0 K. When logging on as an administrator and opening the files (eg with notepad, just to see if there is nothing at all) they appear to be empty. However, while we were working on the problem, pgadmin3 started reporting "permission denied" for 2611. At the same time, pgadmin was unable to see the columns of the tables. Attempting to do so is what caused the error for 2611. 2611 also appeared to be a system file with 0 bytes. Meantime, pgadmin was able to create a table and see the columns on the standard postgres database. Also, the Java application was able to see the columns and list them out as well. I have noticed that postgres is very unhappy if the proper "postgres" user doesn't have access to the files. But I have also noticed that other users seem to be able to have access without causing problems. I realize this compromises security, but in a development environment it is very convenient, eg when doing a system backup. Is it possible that some type of user might be causing files to be created as or changed to system files, marked read only, and apparently empty? I am not certain which users have access to the files at the client's site, but I know it's more than just the postgres user. All of these findings were on the second computer running XP. We ran out of time today before we investigated the original server to see if it also had system files marked read only with no apparent contents. John On Sun, 13 Jun 2010 11:51:45 +0200, Magnus Hagander wrote: >On Sun, Jun 13, 2010 at 5:11 AM, Craig Ringer ><craig@xxxxxxxxxxxxxxxxxxxxx> wrote: >> On 13/06/10 02:34, Adrian Klaver wrote: >> >>>> Question: Is it possible that there's corruption in the database which is >>>> being incorrectly reported as "Permission denied"? >> >> It's certainly not impossible. It'd really help if Pg would print more >> details from Windows' error reporting - GetLastError() etc - in cases >> like this. In fact, some searching reveals complaints about just that as >> far back as mid-2008 related to the exact error you're encountering. > >It does if you enable debug logging. DEBUG5 is required from what I >can tell (see src/port/win32error.c, function _dosmaperr(), which is >called from pgwin32_open()). > >In a lot of cases it maps straight over, but in the cases where we >have to map to an errno value and use that, there can be more than >one. In the case of access denied, it can be: >ERROR_ACCESS_DENIED >ERROR_CURRENT_DIRECTORY >ERROR_LOCK_VIOLATION >ERROR_SHARING_VIOLATION (but this is taken care of already in pgwin32_open) >ERROR_NETWORK_ACCESS_DENIED >ERROR_CANNOT_MAKE >ERROR_FAIL_I24 >ERROR_DRIVE_LOCKED >ERROR_SEEK_ON_DEVICE >ERROR_NOT_LOCKED >ERROR_LOCK_FAILED > >Most of these can't (shouldn't be possible at least) appear when we're >opening a file for reading. But it'd be interesting to know what they >were. > >So it'd be interesting to see the output of this at DEBUG5 (there >should be a line saying "mapped win32 error code <n> to <n>" showing >up - there will be *tons* of other logging output of course) > > >-- > Magnus Hagander > Me: http://www.hagander.net/ > Work: http://www.redpill-linpro.com/ > >-- >Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) >To make changes to your subscription: >http://www.postgresql.org/mailpref/pgsql-general -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general