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 1myHv8-0004IQ-HB for pgsql-committers@arkaria.postgresql.org; Fri, 17 Dec 2021 18:25:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1myHv6-0007Os-PX for pgsql-committers@arkaria.postgresql.org; Fri, 17 Dec 2021 18:25:28 +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 1myHv6-0007Oi-Ab for pgsql-committers@lists.postgresql.org; Fri, 17 Dec 2021 18:25:28 +0000 Received: from mail-oi1-x22c.google.com ([2607:f8b0:4864:20::22c]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1myHv1-0000zY-NU for pgsql-committers@lists.postgresql.org; Fri, 17 Dec 2021 18:25:27 +0000 Received: by mail-oi1-x22c.google.com with SMTP id s139so4808776oie.13 for ; Fri, 17 Dec 2021 10:25:23 -0800 (PST) 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=4PvZXO5nNX+Td6rGIoZJ8DbqMvW9dkLm1KOce6RIZgs=; b=U0QIjPlr7oZxgSfCJBpjzfEoUaB+qvUtMP2Px2EeX5qDAru5TZkAriJ8aP9RBlfKKz rHTKu+FDWn/1GvWAIaeExiWPXmOtnq9jyNtGpknmMtPdQPTwDEylWAhQvseyqeSbfjbH lLDp+N0lAHadRk76DPl/UYfKN8WCs6pxNnnQ8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=4PvZXO5nNX+Td6rGIoZJ8DbqMvW9dkLm1KOce6RIZgs=; b=m87pJzsJZV2idkYz9A8jRNIH6UknWFDwPhI5sce3utaWon3d2KoznRnVbn4WQcKwY4 iVDl8ljH+7rtYEpmDbIrkxxAzlOyxY7NwR3Seq/UiksSOqsOB3edvlTF/8kErnMv0eT9 exl8/n5iEBIyLxE8+tuGg5BrzJ8DVTHLIigW6BThJ0GjSrSQhI/9nqXfQRFGmyF9mIEc srSgeO1rLfDaSyXKEnB6Rejf9LV7yYvr312ABv6Q2cqrhv0i/1uclwmihSYtdg8o0yKx jk8tSLj5SsmkUEDFMyGYZNgfbeWZafrHkKt29CtCdcgIBRN71t3n1HSsa5Xl0HVEScWp /Znw== X-Gm-Message-State: AOAM530LAi0cV4Mqdf5LPjkZ1FHFt3+jMuXU43M2AuNlU1ytHG2YbaoB giLT7gmhoXEO7wEVkoN/aJn3LTjgzvBMwg== X-Google-Smtp-Source: ABdhPJwi/S5LGhBGoTnXftv/gbfQ0rc45dzKmoZoV6Nw9K8cWIrIb0SektdOWznqlTMKcB5En82/nw== X-Received: by 2002:a05:6808:158d:: with SMTP id t13mr3168532oiw.31.1639765521127; Fri, 17 Dec 2021 10:25:21 -0800 (PST) Received: from rfd.leadboat.com ([2600:1702:a20:5750::46]) by smtp.gmail.com with ESMTPSA id n19sm1747366otq.11.2021.12.17.10.25.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Dec 2021 10:25:20 -0800 (PST) Date: Fri, 17 Dec 2021 10:25:18 -0800 From: Noah Misch To: Tom Lane Cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Revoke PUBLIC CREATE from public schema, now owned by pg_databas Message-ID: <20211217182518.GA2529654@rfd.leadboat.com> References: <1363170.1639763559@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1363170.1639763559@sss.pgh.pa.us> 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 Fri, Dec 17, 2021 at 12:52:39PM -0500, Tom Lane wrote: > Noah Misch writes: > > Revoke PUBLIC CREATE from public schema, now owned by pg_database_owner. > > I've just stumbled across a testing problem created by this commit: > if you try to skip the tablespace test, the rest of the run falls > over, because this bit doesn't get executed: > > -- Rest of this suite can use the public schema freely. > GRANT ALL ON SCHEMA public TO public; > > Skipping the tablespace test is something I've been accustomed to do > when testing replication with the standby on the same machine as the > primary, because otherwise you've got to fool with keeping the > standby from overwriting the primary's tablespaces. This hack made > that a lot more painful. > > I'm inclined to think the cleanest fix is to move this step into a > new script, say "test_setup.sql", that is scheduled by itself just > after tablespace.sql. I like that solution for your use case. > It's sort of annoying to fire up a psql+backend > for just one command, but perhaps there's other stuff that could be > put there too. Yes. The src/test/regress suite would be in a better place if one could run most test files via a schedule containing only two files, the setup file and the file of interest. Adding things like the "CREATE TABLE tenk1" to the setup file would help that.