From: Tom Lane <tgl@sss.pgh.pa.us>
To: kevenboudreau58@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18880: Can't have a database without having postgres as a db_name and username
Date: Mon, 07 Apr 2025 09:48:14 -0400
Message-ID: <3392058.1744033694@sss.pgh.pa.us> (raw)
In-Reply-To: <18880-3594571b2fe1bf27@postgresql.org>
References: <18880-3594571b2fe1bf27@postgresql.org>
PG Bug reporting form <noreply@postgresql.org> writes:
> Like I said I can't have a database with another db_name and
> username
Sure you can. The bootstrap superuser account's name is set by
initdb [1]. It's true that you can't change the initial set of
database names (postgres, template0, template1), but you can
create more databases within the installation [2].
If you're really stubborn you can delete or rename the postgres
database, but you might regret it. A lot of client tools assume
that as the default database-to-connect-to. I don't recommend
deleting or renaming template0 or template1 under any
circumstances [3].
regards, tom lane
[1] https://www.postgresql.org/docs/current/app-initdb.html
[2] https://www.postgresql.org/docs/current/manage-ag-createdb.html
[3] https://www.postgresql.org/docs/current/manage-ag-templatedbs.html
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, kevenboudreau58@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18880: Can't have a database without having postgres as a db_name and username
In-Reply-To: <3392058.1744033694@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox