PostgreSQL is a powerful, open source object-relational database system that uses and extends the SQL language combined with many features that safely store and scale the most complicated data workloads.
#PostgreSQL supports many client authentication methods, but in this case we're only going to concern ourselves with two: #password and md5.
To set the default PostgreSQL password:
Run the psql command from the postgres user account: sudo -u postgres psql postgres.
Set the password: \password postgres.
Enter a password.
Close psql. \q.