A Unix user account needs to be created to manage the PostgreSQL database. Typically this user is called postgres, but can be anything that you choose. For consistency through out the book, the user postgres is considered the PostgreSQL root or super-user.

In order to create the PostgreSQL super-user, you will need to have root privileges. On a Linux machine you can use the following commands to add the postgres user.

su - 
useradd postgres
Warning Don't Use the root User
 

Do not try to use the user root as the PostgreSQL super-user. It presents a large security hole, and the system will not allow it.

As the installation of PostgreSQL was done as the root user you will have to change the ownership of the PostgreSQL data directory before use. On Linux/Unix you can use the following command. Using the -R will cause a recursive change of ownership.

chown -R postgres /usr/local/pgsql/data