2 Part III. Server Administration
4 This part covers topics that are of interest to a PostgreSQL
5 administrator. This includes installation, configuration of the server,
6 management of users and databases, and maintenance tasks. Anyone
7 running PostgreSQL server, even for personal use, but especially in
8 production, should be familiar with these topics.
10 The information attempts to be in the order in which a new user should
11 read it. The chapters are self-contained and can be read individually
12 as desired. The information is presented in a narrative form in topical
13 units. Readers looking for a complete description of a command are
14 encouraged to review the Part VI.
16 The first few chapters are written so they can be understood without
17 prerequisite knowledge, so new users who need to set up their own
18 server can begin their exploration. The rest of this part is about
19 tuning and management; that material assumes that the reader is
20 familiar with the general use of the PostgreSQL database system.
21 Readers are encouraged review the Part I and Part II parts for
22 additional information.
26 16. Installation from Binaries
27 17. Installation from Source Code
30 17.2. Getting the Source
31 17.3. Building and Installation with Autoconf and Make
32 17.4. Building and Installation with Meson
33 17.5. Post-Installation Setup
34 17.6. Supported Platforms
35 17.7. Platform-Specific Notes
37 18. Server Setup and Operation
39 18.1. The PostgreSQL User Account
40 18.2. Creating a Database Cluster
41 18.3. Starting the Database Server
42 18.4. Managing Kernel Resources
43 18.5. Shutting Down the Server
44 18.6. Upgrading a PostgreSQL Cluster
45 18.7. Preventing Server Spoofing
46 18.8. Encryption Options
47 18.9. Secure TCP/IP Connections with SSL
48 18.10. Secure TCP/IP Connections with GSSAPI Encryption
49 18.11. Secure TCP/IP Connections with SSH Tunnels
50 18.12. Registering Event Log on Windows
52 19. Server Configuration
54 19.1. Setting Parameters
56 19.3. Connections and Authentication
57 19.4. Resource Consumption
61 19.8. Error Reporting and Logging
62 19.9. Run-time Statistics
64 19.11. Client Connection Defaults
65 19.12. Lock Management
66 19.13. Version and Platform Compatibility
69 19.16. Customized Options
70 19.17. Developer Options
73 20. Client Authentication
75 20.1. The pg_hba.conf File
77 20.3. Authentication Methods
78 20.4. Trust Authentication
79 20.5. Password Authentication
80 20.6. GSSAPI Authentication
81 20.7. SSPI Authentication
82 20.8. Ident Authentication
83 20.9. Peer Authentication
84 20.10. LDAP Authentication
85 20.11. RADIUS Authentication
86 20.12. Certificate Authentication
87 20.13. PAM Authentication
88 20.14. BSD Authentication
89 20.15. OAuth Authorization/Authentication
90 20.16. Authentication Problems
98 21.5. Predefined Roles
99 21.6. Function Security
101 22. Managing Databases
104 22.2. Creating a Database
105 22.3. Template Databases
106 22.4. Database Configuration
107 22.5. Destroying a Database
113 23.2. Collation Support
114 23.3. Character Set Support
116 24. Routine Database Maintenance Tasks
118 24.1. Routine Vacuuming
119 24.2. Routine Reindexing
120 24.3. Log File Maintenance
122 25. Backup and Restore
125 25.2. File System Level Backup
126 25.3. Continuous Archiving and Point-in-Time Recovery (PITR)
128 26. High Availability, Load Balancing, and Replication
130 26.1. Comparison of Different Solutions
131 26.2. Log-Shipping Standby Servers
135 27. Monitoring Database Activity
137 27.1. Standard Unix Tools
138 27.2. The Cumulative Statistics System
140 27.4. Progress Reporting
141 27.5. Dynamic Tracing
142 27.6. Monitoring Disk Usage
144 28. Reliability and the Write-Ahead Log
148 28.3. Write-Ahead Logging (WAL)
149 28.4. Asynchronous Commit
150 28.5. WAL Configuration
153 29. Logical Replication
157 29.3. Logical Replication Failover
160 29.6. Generated Column Replication
166 29.12. Configuration Settings
170 30. Just-in-Time Compilation (JIT)
172 30.1. What Is JIT compilation?
179 31.1. Running the Tests
180 31.2. Test Evaluation
181 31.3. Variant Comparison Files
183 31.5. Test Coverage Examination