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 1lPGBJ-0006u5-6E for pgsql-hackers@arkaria.postgresql.org; Thu, 25 Mar 2021 02:57:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lPGBH-00026m-P7 for pgsql-hackers@arkaria.postgresql.org; Thu, 25 Mar 2021 02:57:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lPGBH-00026c-B4 for pgsql-hackers@lists.postgresql.org; Thu, 25 Mar 2021 02:57:07 +0000 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lPGBE-00083Z-Oa for pgsql-hackers@lists.postgresql.org; Thu, 25 Mar 2021 02:57:06 +0000 Received: by mail-pj1-x102d.google.com with SMTP id il9-20020a17090b1649b0290114bcb0d6c2so2128678pjb.0 for ; Wed, 24 Mar 2021 19:57:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=0MVVM8CzVI0E1LFAbwB6g+ll0hxTOfZ8FXzvFihOjtI=; b=VWRKGuPpK0QEpSTNMY42gO6eEGPHfIseges/TtQm7iONMF08bNQGbFQWCt9W9t7xNk PvhVs+khaW38q2TMO0v9+5Ro+upODQjZo7xPBC3SqdGR4U1E/8igDVrT91YeXw4BF2MM MG2h/vVweN9dFZNxu4lH1EYYuoEKbpjNugI1U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=0MVVM8CzVI0E1LFAbwB6g+ll0hxTOfZ8FXzvFihOjtI=; b=OybfZzSWHdrMUoPG32ahzDk5lYayJ7nLuRGfvycuYRYZA8S3y+xrbQUVvCNtKZankz jgSpH1WjI3zKhezKgEw4VPZUT1s0FiA5qb4seP01PfUtFSS8xIv2kT0Xiy1VZgm6RT3C gc1sWl5Y1V1CliBcm0+DYUuP1US3KNDg1OcYhwxIzbCReurOONc1jz9ZngjX4hH3YYTX OWlOqSxXjTUvaHx/OR2hCyxK0/hkpFoJABd58+iMNacEAgzuZI+/6LWvMSvd1B/PITCS 5AJrqIMElHila3kcULrckYorU+FCD1orewd3/mQ0CKt6smI27zJZLFslPkPPukic1JCT xWYg== X-Gm-Message-State: AOAM530V8oC+OBM9KIkStvp4nTzrmhzJ3V+LqgwVeveMuqf93MgJgD2c 6OdT/ER4ZqVGOfzXvZUh7Uwurg== X-Google-Smtp-Source: ABdhPJzs53XQeEvQbHLzWPZn95moT7Rhp5FcKUgfG/cTbucBWlTSmnm5yK5us1Br+knwC5BgbqDzrQ== X-Received: by 2002:a17:90a:c096:: with SMTP id o22mr6575470pjs.119.1616641022326; Wed, 24 Mar 2021 19:57:02 -0700 (PDT) Received: from rfd.leadboat.com ([2600:1702:a20:5750::46]) by smtp.gmail.com with ESMTPSA id g28sm3822655pfr.120.2021.03.24.19.57.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Mar 2021 19:57:01 -0700 (PDT) Date: Wed, 24 Mar 2021 19:56:59 -0700 From: Noah Misch To: Michael Paquier Cc: Robert Haas , Christoph Berg , PostgreSQL Hackers Subject: Re: pgsql: Move tablespace path re-creation from the makefiles to pg_regres Message-ID: <20210325025659.GA4017435@rfd.leadboat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Mar 25, 2021 at 07:44:02AM +0900, Michael Paquier wrote: > On Wed, Mar 24, 2021 at 10:50:50AM -0400, Robert Haas wrote: > > On Wed, Mar 24, 2021 at 5:56 AM Christoph Berg wrote: > >> Maybe creating the tablespace directory from within the testsuite > >> would suffice? > >> > >> CREATE TABLE foo (t text); > >> COPY foo FROM PROGRAM 'mkdir @testtablespace@'; > >> CREATE TABLESPACE regress_tblspace LOCATION '@testtablespace@'; > > > > Would that work on Windows? That would entail forbidding various shell metacharacters in @testtablespace@. One could avoid imposing such a restriction by adding a mkdir() function to regress.c and writing it like: CREATE FUNCTION mkdir(text) RETURNS void AS '@libdir@/regress@DLSUFFIX@', 'regress_mkdir' LANGUAGE C STRICT\; REVOKE ALL ON FUNCTION mkdir FROM public; SELECT mkdir('@testtablespace@'); CREATE TABLESPACE regress_tblspace LOCATION '@testtablespace@'; > I doubt that all the Windows environments would be able to get their > hands on that. > And I am not sure either that this would work when it > comes to the CI case, again on Windows. How might a CI provider break that?