Specifies the directory of the Unix-domain socket(s) on which the server is to listen for connections from client applications. Multiple sockets can be created by listing multiple directories separated by commas. Whitespace between entries is ignored; surround a directory name with double quotes if you need to include whitespace or commas in the name. An empty value specifies not listening on any Unix-domain sockets, in which case only TCP/IP sockets can be used to connect to the server.
A value that starts with
@ specifies that a Unix-domain socket in the abstract namespace should be created (currently supported on Linux and Windows). In that case, this value does not specify a directory but a prefix from which the actual socket name is computed in the same manner as for the file-system namespace. While the abstract socket name prefix can be chosen freely, since it is not a file-system location, the convention is to nonetheless use file-system-like values such as
The default value is normally /tmp, but that can be changed at build time. On Windows, the default is empty, which means no Unix-domain socket is created by default. This parameter can only be set at server start.
In addition to the socket file itself, which is named
.s.PGSQL.nnnn where nnnn is the server's port number, an ordinary file named
.s.PGSQL.nnnn.lock will be created in each of the
unix_socket_directories directories. Neither file should ever be removed manually. For sockets in the abstract namespace, no lock file is created.
- could not create Unix-domain socket in directory "/var/run/postgresql"
- Move postgresql data store (port stops listening)
- Postgres - Peer authentication - psql: FATAL: role "xxxx" does not exist
- Connect to postgres with custom database cluster location with psql
- Cannot connect to Postgresql on port 5432 But can connect on port 5433
- "unix_socket_directories" should be GUC_LIST_INPUT?
- proposal: function pg_setting_value_split() to parse shared_preload_libraries etc.
- Re: "unix_socket_directories" should be GUC_LIST_INPUT?
- Re: abstract Unix-domain sockets
- Re: proposal: function pg_setting_value_split() to parse shared_preload_libraries etc.