agora inbox for pgsql-docs@postgresql.org
help / color / mirror / Atom feedFrom: PG Doc comments form <noreply@postgresql.org>
To: pgsql-docs@lists.postgresql.org
Cc: postgresql@complexity.com.au
Subject: Creating first database
Date: Sat, 29 Mar 2025 06:19:24 +0000
Message-ID: <174322916469.674.13909966511923455324@wrigleys.postgresql.org> (raw)
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/17/tutorial-createdb.html
Description:
In the Getting Started section of the documentation which would be used by a
new user immediately after installing PostgreSQL, the user is asked to run
$ createdb mydb
If the database is correctly installed, this first command to be run by the
new user inevitably fails with the error:
createdb: error: connection to server at "localhost" (::1), port 5432
failed: FATAL: password authentication failed for user "Mark"
The reason it fails by my understanding is because the installation process
does not create any user and without a user specified on createdb PostgreSQL
is defaulting to using the OS user name. Since this does not exist in
PostgreSQL the access is denied with the incorrect error message above. The
error message suggests that there is a password issue but the real issue is
that PostgreSQL has defaulted to a user that does not exist in PostgreSQL.
This is a disappointing start for a new user. It would be better to explain
this to the user and take them through the user creation process rather than
letting them struggle and Google the issue as I did. I think the typical
user would assume that they should be using their OS user password and then
wonder why that doesn't work.
view thread (5+ messages) latest in thread
Message-ID: <174322916469.674.13909966511923455324@wrigleys.postgresql.org>
Permalink: ../174322916469.674.13909966511923455324@wrigleys.postgresql.org/
Also on: postgresql.org/message-id/174322916469.674.13909966511923455324@wrigleys.postgresql.org
reply
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-docs@postgresql.org
Cc: noreply@postgresql.org, pgsql-docs@lists.postgresql.org, postgresql@complexity.com.au
Subject: Re: Creating first database
In-Reply-To: <174322916469.674.13909966511923455324@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox