If you want to log in to Postgres using the root username, you need to create one first.
First you need to log in as a Postgres user. This is usually postgres (and is specified during installation):
psql -U postgres ....
then you can create roles and databases:
psql (9.4.0) Type "help" for help. postgres=
As the superuser, you can also grant the root necessary privileges.
All parameters for psql described in the manual .
Creating users and databases is also described in the manual:
source share