shared_memory_size_in_huge_pages
Read PG 18 manual ↗Reports the number of huge pages that are needed for the main shared memory area based on the specified huge_page_size.
- Type
- integer
- Context
- internal
- Measured default
- -1
- Unit
- —
- Metadata snapshot
- 18
Definition PG 18 manual
Reports the number of huge pages that are needed for the main shared memory area based on the specified huge_page_size. If huge pages are not supported, this will be -1.
This setting is supported only on Linux. It is always set to -1 on other platforms. For more details about using huge pages on Linux, see Section 18.4.5.
Measured default history
| Version interval | Default |
|---|---|
| 15 – 19 | -1 |
Authored guidance from the GUC source snapshot; the version-specific manual above is the definition reference. View source ↗
How it works
Shows the number of huge pages needed for the main shared memory area. It is read-only and cannot be changed with SET or configuration-file edits.
It estimates how many huge pages the main shared-memory segment needs and returns -1 when the platform cannot provide the estimate.
Interpret it with shared_memory_size, huge_pages, huge_pages_status. Applications and operations tooling may read shared_memory_size_in_huge_pages 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 shared_memory_size_in_huge_pages 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 shared_memory_size_in_huge_pages to verify format, build, or resource assumptions on analytical nodes and keep every read/write candidate compatible.
OLTP: Not tunable. Record shared_memory_size_in_huge_pages 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
- PG 17 → 18changed
- PG 16 → 17changed
- PG 14 → 15added
Related entries
Further reading
Definition snapshot: english-manuals:737a66cfb17aeca7cc5fb7dea80… · English manual source