Skip to content

data_directory_mode

data_directory_mode shows the mode of the data directory. It is read-only metadata in PG11–18, not a runtime tuning control.
Note

Fact — official short description: “Shows the mode of the data directory.”

Identity

Type , Valueinteger
Upstream pg_settings type
Context , Valueinternal
Internal/preset and not user-settable
Unit , Value—
Raw unit
Range , Value0 – 511
Raw limits in the last observed version
Enum values , Value—
— for non-enum types
Category , ValuePreset Options
Upstream classification
Latest boot value , Value448
448

Lifecycle

Fact Value
First observed PG11
Present in PG11–19 Beta 3
Removed in No
Introduction commit c37b3d08ca68 — Allow group access on PGDATA
Commit date 2018-04-07
Discussion thread 1

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG11–19 Beta 3 448 — 448

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.

Tuning advice

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
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.
OLAP Not tunable. Use data_directory_mode to verify format, build, or resource assumptions on analytical nodes and keep every read/write candidate compatible.
Small nodes Not tunable. Preserve it in inventory and incident reports; do not custom-build or rebuild merely to change it without a demonstrated compatibility need.

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 — —
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG11–19 Beta 3 unmodified; OLAP: PG11–19 Beta 3 unmodified; CRIT: PG11–19 Beta 3 unmodified; TINY: PG11–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.

Common pitfalls

  • 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.

block_size · data_checksums · debug_assertions · huge_pages_status · in_hot_standby · integer_datetimes

References