Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp> writes:
> At Wed, 24 Apr 2019 13:23:04 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp> wrote
in<20190424.132304.40676137.horiguchi.kyotaro@lab.ntt.co.jp>
>> We need to adjust relative path between PGDATA-based and
>> pg_tblspc based. The attached first patch does that.
> This is new version. Adjusted pg_basebackup's behavior to allow
> relative mappings. But..
I can't say that I like 0001 at all. It adds a bunch of complication and
new failure modes (e.g., having to panic on chdir failure) in order to do
what exactly? I've not been following the thread closely, but the
original problem is surely just a dont-do-that misconfiguration. I also
suspect that this is assuming way too much about the semantics of getcwd
--- some filesystem configurations may have funny situations like multiple
paths to the same place.
0004 also seems like it's adding at least as many failure modes as
it removes. Moreover, isn't it just postponing the failure a little?
Later WAL might well try to touch the directory you skipped creation of.
We can't realistically decide that all WAL-application errors are
ignorable, but that seems like the direction this would have us go in.
regards, tom lane