Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hJLHk-0008Tj-G5 for pgsql-hackers@arkaria.postgresql.org; Wed, 24 Apr 2019 17:02:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hJLHj-0003lj-4M for pgsql-hackers@arkaria.postgresql.org; Wed, 24 Apr 2019 17:02:15 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hJLHi-0003lc-OX for pgsql-hackers@lists.postgresql.org; Wed, 24 Apr 2019 17:02:14 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hJLHg-0000xk-Dd for pgsql-hackers@lists.postgresql.org; Wed, 24 Apr 2019 17:02:13 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x3OH238k016631; Wed, 24 Apr 2019 13:02:03 -0400 From: Tom Lane To: Andres Freund cc: Kyotaro HORIGUCHI , michael@paquier.xyz, kuntalghosh.2007@gmail.com, pgsql-hackers@lists.postgresql.org Subject: Re: Regression test PANICs with master-standby setup on same machine In-reply-to: <20190424162449.3jrna4iqjm3nzmz2@alap3.anarazel.de> References: <20190423170503.uw5jxrujqlozg23l@alap3.anarazel.de> <20190424.131845.116224815.horiguchi.kyotaro@lab.ntt.co.jp> <20190424.132304.40676137.horiguchi.kyotaro@lab.ntt.co.jp> <20190424.170228.203880527.horiguchi.kyotaro@lab.ntt.co.jp> <10967.1556115189@sss.pgh.pa.us> <20190424162449.3jrna4iqjm3nzmz2@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Wed, 24 Apr 2019 09:24:49 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <16629.1556125323.1@sss.pgh.pa.us> Date: Wed, 24 Apr 2019 13:02:03 -0400 Message-ID: <16630.1556125323@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andres Freund writes: > On 2019-04-24 10:13:09 -0400, Tom Lane wrote: >> 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. > I'm not at all defending the conrete patch. But I think allowing > relative paths to tablespaces would solve a whole lot of practical > problems, while not meaningfully increasing failure modes. I'm not against allowing relative tablespace paths. But I did not like the chdir and getcwd-semantics hazards --- why do we have to buy into all that to allow relative paths? I think it would likely be sufficient to state plainly in the docs that a relative path had better point outside $PGDATA, and maybe have some *simple* tests on the canonicalized form of the path to prevent obvious mistakes. Going further than that is likely to add more problems than it removes. regards, tom lane