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 1u4ktO-006sOG-UL for pgsql-general@arkaria.postgresql.org; Tue, 15 Apr 2025 18:20:19 +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 1u4ktM-00ErV0-Ud for pgsql-general@arkaria.postgresql.org; Tue, 15 Apr 2025 18:20:17 +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 1u4ktL-00ErS5-SW for pgsql-general@lists.postgresql.org; Tue, 15 Apr 2025 18:20:17 +0000 Received: from fhigh-b7-smtp.messagingengine.com ([202.12.124.158]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u4ktI-000Fx1-2E for pgsql-general@lists.postgresql.org; Tue, 15 Apr 2025 18:20:16 +0000 Received: from phl-compute-03.internal (phl-compute-03.phl.internal [10.202.2.43]) by mailfhigh.stl.internal (Postfix) with ESMTP id C987B254014C; Tue, 15 Apr 2025 14:20:10 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-03.internal (MEProxy); Tue, 15 Apr 2025 14:20:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1744741210; x=1744827610; bh=uznSkrxbpDqo1zi7v6oRzQaPNTBdnSKbSxTs1J+Ehlo=; b= JIFT2j24m7D9trOwjF2aInucQn4wafqVuzmEskh2c55r/939hVp9rBr76uCOgSEU aefVARd8PlFrHxqUXnlmPZNjEdL7M+uT9J9bdOLTIUW364sX5fSrvW3Xffn7XlyS sKpb2ncJuB+42FwNuZb3LLE3qzn8xkwbeptLnKyY7lUwYDWO+530l5DxGN4dTvCz AINztQ7mwPEm9kcnJp8L4J64gXXvC0g/eUPskJwAs7fhLWR9CCftoqatvMAzkv9I cbfa/npOTcYefyVSWk+0xvfpIwvxF5YJrrynbzeUrShg3ZUsr4X7oXTbagTJUW5S ZqsbL0xXb7bDVGTL8ikbAA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1744741210; x= 1744827610; bh=uznSkrxbpDqo1zi7v6oRzQaPNTBdnSKbSxTs1J+Ehlo=; b=b uTtvQ176WMIF5s5XbQGjq03G+yEEs678EkCJm1TLxEk0WpAHZj4aEbhPD9/ZKc3w 4/DTa/1/qrQ16RvHoJazRUTrfFKHzkpfQRI1VI5P2O8LqJ2SuOVqVW0OmhlOXlbc 0clS11rDsiF/QpT3eUEZ/CrRsEDZi9vKpu/58Uqze++xHGBGUSsv7byMiTocVZ4p LOFIAAkjCmBp06BnE6ilevw+d/YSZa0KLKp5jMb4plMYuEpbVHpir3wQ59hlnA07 YPGtHzr+zreLZwbiM3EmrAXUhzGhgLFzaX0p/3WoisnqZZi+kNHgG7Qfzrr6EJ97 pXJ8SXWw45DcJmNkx2ADw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvvdegudelucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddt vdejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvh gvrhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepfeegfeeiuedtgffg teeggfehkeejheetieeliefgteeikeejvdeiveeigfehvedtnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhes rghklhgrvhgvrhdrtghomhdpnhgspghrtghpthhtohepfedpmhhouggvpehsmhhtphhouh htpdhrtghpthhtohepuggrvhhiugdrghdrjhhohhhnshhtohhnsehgmhgrihhlrdgtohhm pdhrtghpthhtohepihhkohhrohhttddusehgmhgrihhlrdgtohhmpdhrtghpthhtohepph hgshhqlhdqghgvnhgvrhgrlheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 15 Apr 2025 14:20:09 -0400 (EDT) Message-ID: <25b6cd49-f871-47fe-bf3b-5416637736ca@aklaver.com> Date: Tue, 15 Apr 2025 11:20:08 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Fwd: Identify system databases To: "David G. Johnston" Cc: Igor Korot , "pgsql-generallists.postgresql.org" References: <817abeac-d628-4279-bfef-9e1e3aa1884b@aklaver.com> Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 4/15/25 09:48, David G. Johnston wrote: > On Tue, Apr 15, 2025 at 9:31 AM Adrian Klaver > wrote: > > > Agreed. > > The fact that initdb creates the template0, template1 and postgres > databases and you can't change that makes them system not user > databases. > > > Based on that definition there is a boundary in the system where OIDs > are considered bootstrap/system OIDs versus user OIDs.  Key off of > that.  Though since the names never change, and there are always/only > three, it seems pointless to use the OID aspect of initdb as a basis. > > My definition of a "system database" would be a database that, if it > didn't exist, would cause the system to break.  i.e., is a database > whose presence is integral to the operations of the system.  None of > these qualify under that definition.  Which is why there is no column in > pg_database identifying system databases - there are none. 1) Try connecting(not using single user mode) to a cluster without them. 2) Trying creating a database or databases to replace them without them existing in the first place. If what you say is true why does initdb lack an option to not create them on creating a cluster? > David J. > -- Adrian Klaver adrian.klaver@aklaver.com