Re: "Could not open relation XXX: No such file or directory" - Mailing list pgsql-general

From Alan Millington
Subject Re: "Could not open relation XXX: No such file or directory"
Date
Msg-id 979112.28337.qm@web25406.mail.ukl.yahoo.com
Whole thread Raw
In response to "Could not open relation XXX: No such file or directory"  (Alan Millington <admillington@yahoo.co.uk>)
Responses Re: "Could not open relation XXX: No such file or directory"  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-general
On 19/08/2009 6:38 PM, Craig Ringer wrote:
Got a virus scanner installed? If so, remove it (do not just disable it) and see if you can reproduce the problem. Ditto anti-spyware software.
 

You should also `chkdsk' your file system(s) and use a SMART diagnostic tool to test your hard disk (assuming it's a single ATA disk).

chkdsk reported that the disc is clean.

 

Since installing Postgres in early 2007 I have been running it together with McAfee with no problem. A few days ago McAfee was deinstalled and Kaspersky installed in its place, so Kaspersky appeared to be a suspect.

 

However, on looking at the matter again, I am now almost certain that I caused the problem myself. I have a Python function which (as a workaround to a problem which exists in Python 2.4, the version to which Postgres 8.1.4 is tied) executes a chdir. It appears that once this has happened, the current Postgres session is no longer able to find any new data files, though evidently it is still able to use those that it has located previously. If you can confirm that Postgres does indeed rely on the current working directory to locate its data files, the problem is solved.

 

Moral: never underestimate the stupidity of the people who post the questions (in this case, me)! No doubt this provides one example of why Python is deemed "unsafe".

 


pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: ERROR: could not access file "$libdir/xxid": No such file or directory
Next
From: Thomas Kellerer
Date:
Subject: Getting listed on "Community Guide to PostgreSQL GUI Tools"