5. Server Administration
This part covers topics that are of interest to a PostgreSQL database administrator. This includes installation of the software, set up and configuration of the server, management of users and databases, and maintenance tasks. Anyone who runs a PostgreSQL server, even for personal use, but especially in production, should be familiar with the topics covered in this part.
The information in this part is arranged approximately in the order in which a new user should read it. But the chapters are self-contained and can be read individually as desired. The information in this part is presented in a narrative fashion in topical units. Readers looking for a complete description of a particular command should see reference.
The first few chapters are written so they can be understood without prerequisite knowledge, so new users who need to set up their own server can begin their exploration with this part. The rest of this part is about tuning and management; that material assumes that the reader is familiar with the general use of the PostgreSQL database system. Readers are encouraged to look at tutorial and sql for additional information.
- 5.1. Installation from Source Code
- 5.2. Server Setup and Operation
- 5.2.1. The PostgreSQL User Account
- 5.2.2. Creating a Database Cluster
- 5.2.3. Starting the Database Server
- 5.2.4. Managing Kernel Resources
- 5.2.5. Shutting Down the Server
- 5.2.6. Upgrading a PostgreSQL Cluster
- 5.2.7. Preventing Server Spoofing
- 5.2.8. Encryption Options
- 5.2.9. Secure TCP/IP Connections with SSL
- 5.2.10. Secure TCP/IP Connections with GSSAPI Encryption
- 5.2.11. Secure TCP/IP Connections with SSH Tunnels
- 5.2.12. Registering Event Log on Windows
- 5.3. Server Configuration
- 5.3.1. Setting Parameters
- 5.3.2. File Locations
- 5.3.3. Connections and Authentication
- 5.3.4. Resource Consumption
- 5.3.5. Write Ahead Log
- 5.3.6. Replication
- 5.3.7. Query Planning
- 5.3.8. Error Reporting and Logging
- 5.3.9. Run-time Statistics
- 5.3.10. Automatic Vacuuming
- 5.3.11. Client Connection Defaults
- 5.3.12. Lock Management
- 5.3.13. Version and Platform Compatibility
- 5.3.14. Error Handling
- 5.3.15. Preset Options
- 5.3.16. Customized Options
- 5.3.17. Developer Options
- 5.3.18. Short Options
- 5.4. Client Authentication
- 5.4.1. The pg_hba.conf File
- 5.4.2. User Name Maps
- 5.4.3. Authentication Methods
- 5.4.4. Trust Authentication
- 5.4.5. Password Authentication
- 5.4.6. GSSAPI Authentication
- 5.4.7. SSPI Authentication
- 5.4.8. Ident Authentication
- 5.4.9. Peer Authentication
- 5.4.10. LDAP Authentication
- 5.4.11. RADIUS Authentication
- 5.4.12. Certificate Authentication
- 5.4.13. PAM Authentication
- 5.4.14. BSD Authentication
- 5.4.15. Authentication Problems
- 5.5. Database Roles
- 5.6. Managing Databases
- 5.7. Localization
- 5.8. Routine Database Maintenance Tasks
- 5.9. Backup and Restore
- 5.10. High Availability, Load Balancing, and Replication
- 5.10.1. Comparison of Different Solutions
- 5.10.2. Log-Shipping Standby Servers
- 5.10.2.1. Planning
- 5.10.2.2. Standby Server Operation
- 5.10.2.3. Preparing the Primary for Standby Servers
- 5.10.2.4. Setting Up a Standby Server
- 5.10.2.5. Streaming Replication
- 5.10.2.6. Replication Slots
- 5.10.2.7. Cascading Replication
- 5.10.2.8. Synchronous Replication
- 5.10.2.9. Continuous Archiving in Standby
- 5.10.3. Failover
- 5.10.4. Hot Standby
- 5.11. Monitoring Database Activity
- 5.11.1. Standard Unix Tools
- 5.11.2. The Cumulative Statistics System
- 5.11.2.1. Statistics Collection Configuration
- 5.11.2.2. Viewing Statistics
- 5.11.2.3. pg_stat_activity
- 5.11.2.4. pg_stat_replication
- 5.11.2.5. pg_stat_replication_slots
- 5.11.2.6. pg_stat_wal_receiver
- 5.11.2.7. pg_stat_recovery_prefetch
- 5.11.2.8. pg_stat_subscription
- 5.11.2.9. pg_stat_subscription_stats
- 5.11.2.10. pg_stat_ssl
- 5.11.2.11. pg_stat_gssapi
- 5.11.2.12. pg_stat_archiver
- 5.11.2.13. pg_stat_bgwriter
- 5.11.2.14. pg_stat_wal
- 5.11.2.15. pg_stat_database
- 5.11.2.16. pg_stat_database_conflicts
- 5.11.2.17. pg_stat_all_tables
- 5.11.2.18. pg_stat_all_indexes
- 5.11.2.19. pg_statio_all_tables
- 5.11.2.20. pg_statio_all_indexes
- 5.11.2.21. pg_statio_all_sequences
- 5.11.2.22. pg_stat_user_functions
- 5.11.2.23. pg_stat_slru
- 5.11.2.24. Statistics Functions
- 5.11.3. Viewing Locks
- 5.11.4. Progress Reporting
- 5.11.5. Dynamic Tracing
- 5.12. Monitoring Disk Usage
- 5.13. Reliability and the Write-Ahead Log
- 5.14. Logical Replication
- 5.15. Just-in-Time Compilation (JIT)
- 5.16. Regression Tests