unix_socket_group
Fact — official short description: “Sets the owning group of the Unix-domain socket.”
Identity
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.0 (research boundary) |
| Present in | PG9.0–19 Beta 3 |
| Removed in | No |
| Introduction commit | Not asserted: predates the PG9.0 research boundary |
| Commit date | — |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.0–19 Beta 3 | "" |
— | empty string |
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.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| 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. |
| OLAP | Analytical tools should join the same reviewed local-access group or use TCP/TLS; do not create a broad group merely for convenience. |
| Small nodes | 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. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 unmodified; OLAP: PG9.0–19 Beta 3 unmodified; CRIT: PG9.0–19 Beta 3 unmodified; TINY: PG9.0–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- 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.
Related parameters
listen_addresses · port · max_connections · reserved_connections · superuser_reserved_connections · unix_socket_directories