Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nUUeQ-00020T-Lf for pgsql-committers@arkaria.postgresql.org; Wed, 16 Mar 2022 14:29:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nUUeP-0003Gy-IP for pgsql-committers@arkaria.postgresql.org; Wed, 16 Mar 2022 14:29:21 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nUUeP-0003Go-C5 for pgsql-committers@lists.postgresql.org; Wed, 16 Mar 2022 14:29:21 +0000 Received: from mail.thelabyrinth.net ([45.56.70.56]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nUUeN-0007dX-18 for pgsql-committers@lists.postgresql.org; Wed, 16 Mar 2022 14:29:20 +0000 Received: from [192.168.40.38] (200-188-19-243.static.axtel.net [200.188.19.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: dsteele) by mail.thelabyrinth.net (Postfix) with ESMTPSA id 0798854687; Wed, 16 Mar 2022 14:29:17 +0000 (UTC) Message-ID: <8893318e-5778-ebf4-71b0-afb210d71a52@pgmasters.net> Date: Wed, 16 Mar 2022 08:29:17 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: pgsql: Fix pg_basebackup with in-place tablespaces. Content-Language: en-US To: Kyotaro Horiguchi , thomas.munro@gmail.com Cc: tgl@sss.pgh.pa.us, tmunro@postgresql.org, pgsql-committers@lists.postgresql.org References: <66373991-e520-40c1-f1e8-c758c7b24cb7@pgmasters.net> <428075.1647379703@sss.pgh.pa.us> <20220316.144216.300331926466543986.horikyota.ntt@gmail.com> From: David Steele In-Reply-To: <20220316.144216.300331926466543986.horikyota.ntt@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 3/15/22 23:42, Kyotaro Horiguchi wrote: > At Wed, 16 Mar 2022 11:13:53 +1300, Thomas Munro wrote in >> On Wed, Mar 16, 2022 at 10:28 AM Tom Lane wrote: >>> David Steele writes: >>>> On 3/14/22 19:31, Thomas Munro wrote: >>>>> Fix pg_basebackup with in-place tablespaces. >>> >>>> Perhaps I'm being picky, but seems like this logic should be wrapped in: >>>> if (allow_in_place_tablespaces) >>>> { >>>> <...> >>>> } >>>> I worry about strange effects when this GUC is not enabled. >>> >>> What would happen if someone created an in-place tablespace and >>> then turned off the GUC? >> >> Then it would break with unhelpful error messages. I suppose we could >> error out explicitly, "in-place tablespace detected, but >> allow_in_place_tablespaces not enabled". I'm not sure why we should >> suddenly choose to enforce that *here* though. > > +1. The GUC is only to prevent non-developer users from accidentally > creating in-place tablespaces that is not officieally suported. We > have done nothing about in-place tablespaces other than the things > needed to perform regression test, and I think we won't do that in > future. Sure, but there is a behavioral change whether the GUC is enabled or not. Before, if there was clutter in pg_tblspc there would at least be a warning in the log. Now that logging does not happen. It seems that the warning at line 8313 is essentially dead code now. I don't expect test code to have an impact on production systems, even if the effect is minor. I'm less worried about what happens when the flag is flipped on then off because that's not likely to happen in production. Regards, -David