[Solved]: Internal Exception: org.postgresql.util.PSQLException: FATAL: role "postgres" does not exist

Note that the error message does NOT talk about a missing database, it talks about a missing role.

Later in the login process, it might also stumble over the missing database.

But the first step is to check the missing role:

What is the output within psql of the command du?

On my Mac system the relevant line looks like this:

                              List of roles Role name |            Attributes             | Member of -----------+-----------------------------------+----------- postgres  | Superuser, Create role, Create DB | {}        

If there is not at least one role with superuser, then you have a problem 🙂

If there is one, you can use that to login. And looking at the output of your l command:

The permissions for user on the template0 and template1 databases are the same as on my Mac system for the superuser postgres.

So I think your setup simple uses user as the superuser.

So you could try this command to login:

sudo -u user psql user

If user is really the DB superuser you can create another DB superuser and a private, empty database for him:

CREATE USER postgres SUPERUSER;CREATE DATABASE postgres WITH OWNER postgres;