Entries in the pg_hba.conf file specify the authentication method or methods that the server will use when authenticating connecting clients. Before connecting to the server, you may be required to modify the authentication properties specified in the pg_hba.conf file.
When you invoke the initdb utility to create a cluster, initdb creates a pg_hba.conf file for that cluster that specifies the type of authentication required from connecting clients.
file specifies that connections are allowed using peer
authentication allows local connections from the client's operating system user name to the database.
authentication allows TCP/IP connections from the client's operating system user name (as listed in on an ident
To modify the pg_hba.conf file, open the file with your choice of editor. After modifying the authentication settings in the pg_hba.conf file, use the services utility (Windows), or use the following command to restart the server and apply the changes: