# unix_socket_group

> unix_socket_group is the PostgreSQL setting that defines the owning group of the Unix-domain socket.
---

> [!NOTE]
> **Fact — official short description:** “Sets the owning group of the Unix-domain socket.”

## Identity {#identity}

| Field | Value | Meaning |
| --- | --- | --- |
| Type | `string` | Upstream pg_settings type |
| Context | `postmaster` | Requires a server restart |
| Unit | — | Raw unit |
| Range | — | Raw limits in the last observed version |
| Enum values | — | — for non-enum types |
| Category | Connections and Authentication / Connection Settings | Upstream classification |
| Latest boot value | `""` | empty string |
{.fields meta="-"}

## Lifecycle {#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 {#default-history}

| Versions | Raw `boot_val` | Unit | Human value |
| --- | --- | --- | --- |
| PG9.0–19 Beta 3 | `""` | — | empty string |
{.full-width caption="Measured PG9.0–19 Beta 3 boot defaults"}

## How it works {#mechanism}

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 {#tuning-advice}

> [!TIP]
> **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. |
{.full-width}

## Pigsty {#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 | — | — |
{.full-width}

> [!CAUTION]
> **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 {#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 {#related-parameters}

[`listen_addresses`](/parameters/listen-addresses/) · [`port`](/parameters/port/) · [`max_connections`](/parameters/max-connections/) · [`reserved_connections`](/parameters/reserved-connections/) · [`superuser_reserved_connections`](/parameters/superuser-reserved-connections/) · [`unix_socket_directories`](/parameters/unix-socket-directories/)

## References {#references}

- [PostgreSQL 19 Beta 3 — unix_socket_group](https://www.postgresql.org/docs/19/runtime-config-connection.html#GUC-UNIX-SOCKET-GROUP)
- [PostgreSQL 19 release notes](https://www.postgresql.org/docs/19/release-19.html)
- [Machine-readable GUC export](/data/guc.jsonl)
