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