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 1u4nfZ-007V1y-5q for pgsql-general@arkaria.postgresql.org; Tue, 15 Apr 2025 21:18:14 +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 1u4nfX-00HEvL-0W for pgsql-general@arkaria.postgresql.org; Tue, 15 Apr 2025 21:18:11 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u4nfW-00HEvA-LF for pgsql-general@lists.postgresql.org; Tue, 15 Apr 2025 21:18:11 +0000 Received: from mail-oo1-xc2d.google.com ([2607:f8b0:4864:20::c2d]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1u4nfV-000G2Y-18 for pgsql-general@lists.postgresql.org; Tue, 15 Apr 2025 21:18:10 +0000 Received: by mail-oo1-xc2d.google.com with SMTP id 006d021491bc7-601a891ab8fso49096eaf.1 for ; Tue, 15 Apr 2025 14:18:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744751889; x=1745356689; darn=lists.postgresql.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=1FvwXvVT0oHKfgTYTn7zsaCRRyFE9JfCZcodiKmpk5k=; b=edn8XrNzU+Ks8aFrgJ4U3VgdCEhwZEZBuoYPhllg1JRhC+cEpse1obsZLADHEtcD4y ZUPnAD2ZdAZ8HZyyeZq7N0DVwjFJ/myVlOwsQ9EOX6xyP6jU5gcGiEyW0eq38XwU3TbK xE5cRWeVqCE42kk1KXz0W2Cwj57Y/KcSnnTUZtNW/aowpoJVtkpsx/raQ/f+7wMSPan6 ZlTK9iP8Tb8RHf84yzWv9zmbJjUec3EuRWlN2UgIlgmN78SSM2+QCgjm3FNOd7OphRGX cATKqLnKn5n5rEyZ+/eWdpGHDPQGe9jlEsOYlCke060de4lkUogIQwf3rMK42JbzckQH jRug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744751889; x=1745356689; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=1FvwXvVT0oHKfgTYTn7zsaCRRyFE9JfCZcodiKmpk5k=; b=xRP1Kjvtmjm4Wyz048MXlUgPXOBjZyPFbEDuQzmq49Ef4yUNRaNWG4Wc7y9OdTaCFb pRfnm1p9cUmEJRpQvYYA6QyP7lhUvyYCfn0cmOpN3hYhizIZwh8p3Y0YWKZD9UrrgfP+ 6q+H9pkGp88ScUy90j8DahByXxQazyOOveQsoGJtU8N313PlGSZFddKptecjjFXYbdjI 9zNNJVK9qZqAeAhitoxXkJFLv2PIoUkJCcKikPFjysuSzTKebTCo2viwooI2BlJeZLfB Y2PjN1Yh3l9aKyGAgndtCDIQnFOGx043h47DXrwAMgpqt/0pXP8uzIo2QBVWRt9LdkjO AljA== X-Gm-Message-State: AOJu0YxcouSPINkg+DLjuziL+sEAK47ihsF7Wb4yPWit1drzHGbz6WeP MhK1TPswog/nf/WUj5njUFFrnpg34HwwNJI3mEcg17vhU1n1FxcdltUd/xNtb8sIWFKRQ1P10gl CBexn+bVOl3O2Qbq0EQfYT0VtJTkkKQ== X-Gm-Gg: ASbGnct6ftAK+zyXLRXCuSLr8Q3XV89z0vMe9zIfQL2aeiZ+uyhuGJ/qdfXD6mJ7/M3 xP9Fuh9zZVAXBrYrIA8g8dT7aeEdggGEO/z75bddD3Ebhly3n5218gb1YOlKDxkm/E3Dgvqtd0p 5ZW4SYqM3lHU9RqCBBuPBmVGs= X-Google-Smtp-Source: AGHT+IEOIyG0OSc6OgFV4pPN8G8Ilu+4aGi/tVT5J7dq1pEv0xI3ygvy2j1f3qOrsYUiwczTgqNtRcSxy2nLWaCN0kc= X-Received: by 2002:a05:6820:4a14:b0:5fe:b3c2:29e2 with SMTP id 006d021491bc7-6049a3111bemr3442899eaf.2.1744751888697; Tue, 15 Apr 2025 14:18:08 -0700 (PDT) MIME-Version: 1.0 References: <817abeac-d628-4279-bfef-9e1e3aa1884b@aklaver.com> <25b6cd49-f871-47fe-bf3b-5416637736ca@aklaver.com> <1715575.1744744253@sss.pgh.pa.us> In-Reply-To: <1715575.1744744253@sss.pgh.pa.us> From: Ron Johnson Date: Tue, 15 Apr 2025 17:17:57 -0400 X-Gm-Features: ATxdqUENo_d41LcwoR0hM_y5tFvFb1lsL0F9Aibs9CgJZv0XDqI-BJYg23_09fI Message-ID: Subject: Re: Fwd: Identify system databases To: "pgsql-generallists.postgresql.org" Content-Type: multipart/alternative; boundary="0000000000008c0fdd0632d7b4dc" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000008c0fdd0632d7b4dc Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Apr 15, 2025 at 3:11=E2=80=AFPM Tom Lane wrote: > "David G. Johnston" writes: > > On Tue, Apr 15, 2025 at 11:20=E2=80=AFAM Adrian Klaver < > adrian.klaver@aklaver.com> > > 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 t= o > > 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.) > Interesting history. I've always interpreted the "postgres" database as being the system database, but now I know it's not. --=20 Death to , and butter sauce. Don't boil me, I'm still alive. lobster! --0000000000008c0fdd0632d7b4dc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, Apr 15, 2025 at 3:11=E2=80=AFPM T= om Lane <tgl@sss.pgh.pa.us> = wrote:
"David G. Johnston" <david.g.johnston= @gmail.com> writes:
> On Tue, Apr 15, 2025 at 11:20=E2=80=AFAM Adrian Klaver <adrian.klaver@aklaver.c= om>
> wrote:
>> If what you say is true why does initdb lack an option to not crea= te
>> them on creating a cluster?

> By creating the initial three databases the system is more usable due = to
> having established conventions.=C2=A0 They are conventional databases,= not
> system ones.

Precisely.=C2=A0 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.=C2=A0 If we didn't have it we'd need some other conv= ention.
(Indeed, we used to not have it, and back then the default client
behavior was usually to connect to template1.=C2=A0 That led to people
creating random junk in template1 and then being surprised when
CREATE DATABASE copied it into new databases.)
=C2=A0<= /div>
Interesting history.=C2=A0 I've always interpreted the "= postgres" database as being the system database, but now I know it'= ;s not.

--=
Dea= th to <Redacted>, and butter sauce.
Don't boil me, I'm st= ill alive.
<Redacted> lobster!
--0000000000008c0fdd0632d7b4dc--