Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u4lgT-0073EY-Am for pgsql-general@arkaria.postgresql.org; Tue, 15 Apr 2025 19:11:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1u4lgQ-00FWRo-DJ for pgsql-general@arkaria.postgresql.org; Tue, 15 Apr 2025 19:10:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u4lgQ-00FWRg-1r for pgsql-general@lists.postgresql.org; Tue, 15 Apr 2025 19:10:58 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u4lgN-000GPb-2A for pgsql-general@lists.postgresql.org; Tue, 15 Apr 2025 19:10:58 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 53FJArXH1715576; Tue, 15 Apr 2025 15:10:53 -0400 From: Tom Lane To: "David G. Johnston" cc: Adrian Klaver , Igor Korot , "pgsql-generallists.postgresql.org" Subject: Re: Fwd: Identify system databases In-reply-to: References: <817abeac-d628-4279-bfef-9e1e3aa1884b@aklaver.com> <25b6cd49-f871-47fe-bf3b-5416637736ca@aklaver.com> Comments: In-reply-to "David G. Johnston" message dated "Tue, 15 Apr 2025 11:35:34 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <1715574.1744744253.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Tue, 15 Apr 2025 15:10:53 -0400 Message-ID: <1715575.1744744253@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "David G. Johnston" writes: > On Tue, Apr 15, 2025 at 11:20 AM Adrian Klaver > wrote: >> If what you say is true why does initdb lack an option to not create >> them on creating a cluster? > By creating the initial three databases the system is more usable due to > having established conventions. They are conventional databases, not > system ones. Precisely. For example, the only reason for the "postgres" database to exist is so that there is a reasonable default database for clients to connect to. If we didn't have it we'd need some other convention. (Indeed, we used to not have it, and back then the default client behavior was usually to connect to template1. That led to people creating random junk in template1 and then being surprised when CREATE DATABASE copied it into new databases.) In the end this discussion is about terminology. These three databases are part of the ecosystem and clients generally expect them to be there. But the server doesn't depend on them to function. Does that make them "system" databases? All depends on what you think that means. regards, tom lane