Re: Regression test PANICs with master-standby setup on same machine - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Regression test PANICs with master-standby setup on same machine
Date
Msg-id 10967.1556115189@sss.pgh.pa.us
Whole thread Raw
In response to Re: Regression test PANICs with master-standby setup on samemachine  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Responses Re: Regression test PANICs with master-standby setup on same machine
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: finding changed blocks using WAL scanning
Next
From: Tom Lane
Date:
Subject: Re: [Patch] Check file type before calling AllocateFile() for files out of pg data directory to avoid potential issues (e.g. hang).