Free Hosting Online for WorkStations

< Previous | Contents | Next >

Connection Type and Client Authentication‌


By default, PostgreSQL listens for incoming connections in two ways: on TCP port 5432 of the local- host interface and on file-based socket /var/run/postgresql/.s.PGSQL.5432. This can be con- figured in postgresql.conf with various directives: listen_addresses for the addresses to listen to, port for the TCP port, and unix_socket_directories to define the directory where the file-based sockets are created.

Depending on how they connect, clients are authenticated in different ways. The pg_hba.conf configuration file defines who is allowed to connect on each socket and how they are authenti- cated. By default, connections on the file-based socket use the Unix user account as the name of the PosgreSQL user, and it assumes that no further authentication is required. On the TCP connec- tion, PostgreSQL requires the user to authenticate with a username and a password (though not a Unix username/password but rather one managed by PostgreSQL itself).

The postgres user is special and has full administrative privileges over all databases. We will use this identity to create new users and new databases.


Top OS Cloud Computing at OnWorks: