Enabling access for network/remote users
PostgreSQL comes in a variety of distributions. In many of these, you will note that remote access is initially disabled as a security measure. You can do this quickly as described here, but you really should read the chapter on Security soon.
How to do it…
By default, PostgreSQL gives access to clients who connect using Unix sockets, provided that the database user is the same as the system's username. Here, we'll show you how to enable other connections.
Note
In this recipe, we mention configuration files, which can be located as shown in the Finding the current configuration settings recipe in Chapter 3, Server Configuration.
The steps are as follows:
- Add or edit this line in yourÂ
postgresql.conf
 file:listen_addresses = '*'
- Add the following line as the first line ofÂ
pg_hba.conf
 to allow access to all databases...