unix_socket_group
Read PG 18 manual ↗Sets the owning group of the Unix-domain socket(s).
- Type
- string
- Context
- postmaster
- Measured default
- Empty string
- Unit
- —
- Metadata snapshot
- 18
Definition PG 18 manual
Sets the owning group of the Unix-domain socket(s). (The owning user of the sockets is always the user that starts the server.) In combination with the parameter unix_socket_permissions this can be used as an additional access control mechanism for Unix-domain connections. By default this is the empty string, which uses the default group of the server user. This parameter can only be set at server start.
This parameter is not supported on Windows. Any setting will be ignored. Also, sockets in the abstract namespace have no file owner, so this setting is also ignored in that case.
Measured default history
| Version interval | Default |
|---|---|
| 9.0 – 19 | Empty string |
Authored guidance from the GUC source snapshot; the version-specific manual above is the definition reference. View source ↗
How it works
unix_socket_group sets the owning group of filesystem Unix-domain sockets; the owning user remains the PostgreSQL server account. An empty string uses that account's default group, and unix_socket_permissions determines which group access bits are usable.
It is a POSTMASTER-context setting, so changing it requires restart and affects sockets recreated at startup. Directory ownership and traversal rights, group membership, and pg_hba.conf local records remain separate access layers.
The setting is unsupported and ignored on Windows. It is also ignored for Linux abstract-namespace sockets selected by an @-prefixed unix_socket_directories entry, because those sockets have no filesystem owner or group.
Operational considerations
Expecting a reload to change socket ownership; the socket is recreated only at server restart.
Relying on this setting on Windows or for an abstract-namespace socket, where it is ignored.
Granting membership in the socket group without separately enforcing pg_hba.conf authentication and database privileges.
Changing the socket group while directory traversal permissions still prevent intended clients from reaching it.
Workload guidance
OLAP: Analytical tools should join the same reviewed local-access group or use TCP/TLS; do not create a broad group merely for convenience.
OLTP: Choose a dedicated operating-system group only for local tools that need socket reachability, audit its membership, and pair it with 0770-style socket and directory permissions. Test pg_hba.conf authentication separately.
SMALL: Use the server account's default group unless a managed local client requires another one. On Windows or abstract sockets, configure the actual applicable access boundary instead because this GUC is ignored.
Version history 4
- PG 17 → 18changed
- PG 13 → 14changed
- PG 12 → 13changed
- PG 9.2 → 9.3changed
Related entries
Further reading
Definition snapshot: english-manuals:d37af322ebc687ddfbed099e80c… · English manual source