PostgreSQL comes in a variety of distributions. In many of these, you will notice that remote access is initially disabled as a security measure.
By default, PostgreSQL gives access to clients who connect using Unix sockets, provided the database user is the same as the system's username. Here, we'll show you how to enable other connections.
In this recipe, we mention configuration files, which can be located as shown in the Finding the current configuration settings recipe in Chapter 3, Configuration.
The steps are as follows:
listen_addresses = '*'
pg_hba.confto allow access to all databases for ...