select open change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

CONFIGURATION / PRESET OPTIONS

data_directory_mode

Read PG 18 manual ↗

On Unix systems this parameter reports the permissions the data directory (defined by data_directory) had at server startup.

Type
integer
Context
internal
Measured default
448
Unit
Metadata snapshot
18

Definition PG 18 manual

On Unix systems this parameter reports the permissions the data directory (defined by data_directory) had at server startup. (On Microsoft Windows this parameter will always display 0700.) See the initdb -g option for more information.

Measured default history
Version intervalDefault
11 – 19448
Analysis & operational context

Authored guidance from the GUC source snapshot; the version-specific manual above is the definition reference. View source ↗

How it works

Shows the mode of the data directory. It is read-only and cannot be changed with SET or configuration-file edits.

It reports the effective Unix permission mode of the data directory, commonly 0700 or group-readable 0750, in decimal pg_settings representation.

Interpret it with block_size, data_checksums, debug_assertions. Applications and operations tooling may read data_directory_mode for capability or environment detection, but cannot SET it; cross-cluster comparisons must account for build, initdb, and current-database differences.

Operational considerations

Trying to change read-only data_directory_mode with SET or a configuration file.

Assuming every cluster, database, or vendor build reports the same value.

Ignoring the value in file-format or feature-compatibility checks.

Treating reported metadata as a performance target instead of an environment fact.

Workload guidance

OLAP: Not tunable. Use data_directory_mode to verify format, build, or resource assumptions on analytical nodes and keep every read/write candidate compatible.

OLTP: Not tunable. Record data_directory_mode as a deployment/capability fact; if it is unexpected, fix the binary, initdb, or database-creation process rather than trying SET.

SMALL: Not tunable. Preserve it in inventory and incident reports; do not custom-build or rebuild merely to change it without a demonstrated compatibility need.

Version history 3
  1. PG 17 → 18changed
  2. PG 13 → 14changed
  3. PG 10 → 11added

Related entries

Further reading

Definition snapshot: english-manuals:3b0c4508fca502ab4c91ad4d98b… · English manual source