shared_memory_size

A preset configuration parameter reporting the main shared memory size
This entry relates to a PostgreSQL feature which is part of PostgreSQL 15, due to be released in late 2022.

shared_memory_size is a preset configuration parameter reporting the size of the main shared memory area.

shared_memory_size was added in PostgreSQL 15.

Usage

shared_memory_size is computed at runtime and reports the size of the server's main shared memory area. This includes the amount of shared memory allocated by extensions as this is calculated after processing shared_preload_libraries.

The reported value is rounded up to the nearest megabyte.

Change history

Examples

Value reported by shared_memory_size on a default installation with pg_stat_statements loaded:

postgres=# SHOW shared_memory_size;
 shared_memory_size 
--------------------
 145MB
(1 row)

Categories

Memory, Preset configuration item

See also

shared_memory_size_in_huge_pages, shared_buffers, shared_memory_type