GUC Parameters / Preset Options
shared_memory_size
Read the PG 18 manualReports the size of the main shared memory area, rounded up to the nearest megabyte.
Reading PG 18current·documented in 6 of 24 versions, 15 to 20
- Type
- integer
- Context
- internal
- Measured default
- 0 B
- Unit
- MB
- Metadata snapshot
- 18
Definition PG 18 manual
Reports the size of the main shared memory area, rounded up to the nearest megabyte.
Measured default history
| Version interval | Default |
|---|---|
| 15 – 19 | 0 B |
Authored guidance from the GUC source snapshot; the version-specific manual above is the definition reference. View source
How it works
Shows the size of the server's main shared memory area (rounded up to the nearest MB). It is read-only and cannot be changed with SET or configuration-file edits.
It reports the rounded size of PostgreSQL's main shared-memory segment after startup sizing.
Interpret it with shared_memory_size_in_huge_pages, huge_pages, huge_pages_status. Applications and operations tooling may read shared_memory_size 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 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 to verify format, build, or resource assumptions on analytical nodes and keep every read/write candidate compatible.
OLTP: Not tunable. Record shared_memory_size 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 1
- 14 → 15 added
Related entries
Further reading
Definition snapshot: english-manuals:d05e99de5eef4ae9ab7d6403680… · English manual source