Re: Backend working directories and absolute file paths - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Backend working directories and absolute file paths
Date
Msg-id 21349.1120163485@sss.pgh.pa.us
Whole thread Raw
In response to Re: Backend working directories and absolute file paths  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> Maybe I have misunderstood. Could the backends not chdir into the db 
> subdir and then do everything relative to that (using .. if necessary)?

If we do that then the path to things from the postmaster is different
than it is for the children, which is going to make things quite a bit
more complicated (eg, md.c will have to be aware of whether it is
running in a backend or the bgwriter).  I'm certain we can make it work
if everyplace uses the same relative paths, but I'm less certain about
the reliability of using varying paths.

Also that would break setups where $PGDATA/base or one of its immediate
children is a symlink.  Now the need to set things up that way is
certainly a lot less than it was before we had tablespaces, but I'm
still inclined to avoid depending on .. for addressing stuff.

> How does this all play with tablespaces?

I don't think it matters, since we address those via pg_tblspc anyway.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Checkpoint cost, looks like it is WAL/CRC
Next
From: Greg Stark
Date:
Subject: Re: Backend working directories and absolute file paths