Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aES5w-0006pf-CU for pgsql-bugs@arkaria.postgresql.org; Thu, 31 Dec 2015 01:32:00 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aES5v-0006EK-Uc for pgsql-bugs@arkaria.postgresql.org; Thu, 31 Dec 2015 01:31:59 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aES5J-0005Xk-Kr for pgsql-bugs@postgresql.org; Thu, 31 Dec 2015 01:31:21 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1aES5G-0007qU-N8 for pgsql-bugs@postgresql.org; Thu, 31 Dec 2015 01:31:20 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1aES5E-0002cQ-DY; Wed, 30 Dec 2015 20:31:16 -0500 Date: Wed, 30 Dec 2015 20:31:16 -0500 From: Bruce Momjian To: Tom Lane Cc: Alvaro Herrera , xelah-postgresql@xelah.com, pgsql-bugs@postgresql.org Subject: Re: BUG #13783: 'create database test owner testowner' as 'postgres' leaves test.public owned by postgres Message-ID: <20151231013116.GC4360@momjian.us> References: <20151124121258.435.64678@wrigleys.postgresql.org> <32252.1448402726@sss.pgh.pa.us> <20151124222748.GK4073@alvherre.pgsql> <1674.1448406136@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1674.1448406136@sss.pgh.pa.us> User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On Tue, Nov 24, 2015 at 06:02:16PM -0500, Tom Lane wrote: > Alvaro Herrera writes: > > Tom Lane wrote: > >> Yes, the public schema remains owned by the bootstrap superuser. That's > >> intentional. If you don't want to have that schema, you can drop it, > >> but you need superuser privileges to do so. > > > We've gotten complaints about it over the years -- this is mostly > > fallout caused by introduction of schemas, rather than explicitely > > designed behavior. (Before schemas, the database resulting out of > > copying the template would be completely empty of objects.) > > It's far from empty of objects ... that's just the only one that people > commonly want to drop. > > > As I remember, Fabien Coelho tried to fix it (many years ago) by having > > CREATE DATABASE connect to the newly created database and issue a few > > ALTER commands, but there's no real convenient way to do that. IMO down > > the road this is something we need to fix. What we have now is not > > ideal. > > Perhaps. To my mind the lack of ability to do anything but slavishly > duplicate the contents of template1 is just one of the shortcomings of > the physical-file-copy-based implementation of CREATE DATABASE. If we > were to reimplement that somehow then we might have the option to change > the properties of some of the objects. (Admittedly, I have no good > ideas as to exactly what a new implementation might look like. But > ideally it would capture an MVCC snapshot of the template and not have > all the weird restrictions we have now, like having to force a > checkpoint.) > > But anyway, it's behaving as designed, and I would strongly recommend that > the OP not hold his breath while waiting for it to change. FYI, this is so far out it isn't even on the TODO list. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Roman grave inscription + -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs