Re: Why is failure to find file a "NOTICE"? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Why is failure to find file a "NOTICE"?
Date
Msg-id 8160.973284911@sss.pgh.pa.us
Whole thread Raw
In response to Re: Why is failure to find file a "NOTICE"?  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> Tom Lane writes:
>> Either that, or convert it to an absolute path.  The problem is that the
>> backends chdir() to their individual databases' data directories, so
>> relative paths that were OK from the postmaster's perspective are no
>> good anymore.

> Is there a profound reason for this chdir()?

I like it because it keeps coredump files separate for backends in
different databases, not to mention separate from the postmaster's
own corefile.

It used to be true that some places in the backend would use relative
paths (ie, just "foo") to access some files, so that was also forcing
the working directory to be the same as the database subdirectory.
Other places build absolute paths (or what they think are absolute
paths, anyway) by prepending the -D string.  I'm not sure if all the
uses of relative paths have been removed or not.  Just on performance
grounds it seems to me that using relative paths is preferable, and we
ought to be removing the prepending of the -D path rather than making
it essential...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Ian Lance Taylor
Date:
Subject: Re: [HACKERS] 7.0.3 branded
Next
From: Peter Eisentraut
Date:
Subject: Alternative database locations are broken