Search Postgresql Archives

Re: "Could not open relation XXX: No such file or directory"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alan Millington wrote:

> 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.   

Yes, Postgres expects that the CWD is not changed.  Files that were
previously opened continue to work fine, because they are kept open.
Do not chdir() in a function.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux