PostgreSQL is configured by means of a bunch of text files that contain directives and values used to bootstrap the cluster and get it running. We saw how configuration files are handled at the beginning of this book and throughout, whenever we needed to perform particular configurations, such as to manage logging. This section will revisit and explain how to configure a cluster in more detail.
There are two main configuration files that present the starting point for any configuration:
- postgresql.conf is the main cluster configuration file and contains all the data required to start the cluster, set up processes (as WAL senders) and logging, and configure how the cluster will accept connections (for example, on which TCP/IP address).
- pg_hba.conf is the file that's used to allow or deny the client connections to the cluster. It was explained extensively in Chapter 3, Managing Users and Connections, and is related to the users and roles authentication mechanisms...