Create a UNIX user account to own and manage the PostgreSQL database files. Typically, this user is named
postgres
, but it can be named anything that you choose. For consistency throughout the book, the user
postgres
is considered the PostgreSQL root or superuser.
You will need to have root privileges to create the PostgreSQL superuser. On a Linux machine, you can use the
command shown in Example 2-5 to add the
postgres
user.
Example 2-5. Adding the postgres User
$
su - -c "useradd postgres"
Warning
|
Do not try to use the
root
user as the PostgreSQL superuser. Doing so presents a large
security hole.
|