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

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: "Could not open relation XXX: No such file or directory"
Дата
Msg-id 20090824022132.GI5287@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: "Could not open relation XXX: No such file or directory"  (Alan Millington <admillington@yahoo.co.uk>)
Список pgsql-general
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.

В списке pgsql-general по дате отправления:

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: What approach should I use instead of creating tables on the fly?
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Getting listed on "Community Guide to PostgreSQL GUI Tools"