Chapter 3. Server Runtime Environment

Table of Contents
3.1. The PostgreSQL user account
3.2. Creating a database cluster
3.3. Starting the database server
3.3.1. Server Start-up Failures
3.3.2. Client Connection Problems
3.4. Run-time configuration
3.4.1. Planner and Optimizer Tuning
3.4.2. Logging and Debugging
3.4.3. General operation
3.4.4. WAL
3.4.5. Short options
3.5. Managing Kernel Resources
3.5.1. Shared Memory and Semaphores
3.5.2. Resource Limits
3.6. Shutting down the server
3.7. Secure TCP/IP Connections with SSL
3.8. Secure TCP/IP Connections with SSH tunnels

This chapter discusses how to set up and run the database server and the interactions with the operating system.

3.1. The PostgreSQL user account

As with any other server daemon that is connected to the world at large, it is advisable to run PostgreSQL under a separate user account. This user account should only own the data itself that is being managed by the server, and should not be shared with other daemons. (Thus, using the user "nobody" is a bad idea.) It is not advisable to install the executables as owned by this user account because that runs the risk of user-defined functions gone astray or any other exploits compromising the executable programs.

To add a user account to your system, look for a command useradd or adduser. The user name postgres is often used but by no means required.