mirror of
https://github.com/postgres/postgres.git
synced 2025-10-19 15:49:24 +03:00
Allow dynamic allocation of shared memory segments.
Patch by myself and Amit Kapila. Design help from Noah Misch. Review by Andres Freund.
This commit is contained in:
@@ -61,6 +61,7 @@
|
||||
#include "replication/walreceiver.h"
|
||||
#include "replication/walsender.h"
|
||||
#include "storage/bufmgr.h"
|
||||
#include "storage/dsm_impl.h"
|
||||
#include "storage/standby.h"
|
||||
#include "storage/fd.h"
|
||||
#include "storage/proc.h"
|
||||
@@ -385,6 +386,7 @@ static const struct config_enum_entry synchronous_commit_options[] = {
|
||||
*/
|
||||
extern const struct config_enum_entry wal_level_options[];
|
||||
extern const struct config_enum_entry sync_method_options[];
|
||||
extern const struct config_enum_entry dynamic_shared_memory_options[];
|
||||
|
||||
/*
|
||||
* GUC option variables that are exported from this module
|
||||
@@ -3335,6 +3337,16 @@ static struct config_enum ConfigureNamesEnum[] =
|
||||
NULL, NULL, NULL
|
||||
},
|
||||
|
||||
{
|
||||
{"dynamic_shared_memory_type", PGC_POSTMASTER, RESOURCES_MEM,
|
||||
gettext_noop("Selects the dynamic shared memory implementation used."),
|
||||
NULL
|
||||
},
|
||||
&dynamic_shared_memory_type,
|
||||
DEFAULT_DYNAMIC_SHARED_MEMORY_TYPE, dynamic_shared_memory_options,
|
||||
NULL, NULL, NULL
|
||||
},
|
||||
|
||||
{
|
||||
{"wal_sync_method", PGC_SIGHUP, WAL_SETTINGS,
|
||||
gettext_noop("Selects the method used for forcing WAL updates to disk."),
|
||||
|
@@ -123,6 +123,13 @@
|
||||
#work_mem = 1MB # min 64kB
|
||||
#maintenance_work_mem = 16MB # min 1MB
|
||||
#max_stack_depth = 2MB # min 100kB
|
||||
#dynamic_shared_memory_type = posix # the default is the first option
|
||||
# supported by the operating system:
|
||||
# posix
|
||||
# sysv
|
||||
# windows
|
||||
# mmap
|
||||
# use none to disable dynamic shared memory
|
||||
|
||||
# - Disk -
|
||||
|
||||
|
Reference in New Issue
Block a user