diff options
Diffstat (limited to 'src/backend/utils/misc')
-rw-r--r-- | src/backend/utils/misc/guc_tables.c | 7 | ||||
-rw-r--r-- | src/backend/utils/misc/postgresql.conf.sample | 4 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/backend/utils/misc/guc_tables.c b/src/backend/utils/misc/guc_tables.c index c0a52cdcc3e..289dea7878a 100644 --- a/src/backend/utils/misc/guc_tables.c +++ b/src/backend/utils/misc/guc_tables.c @@ -2510,6 +2510,11 @@ struct config_int ConfigureNamesInt[] = NULL, NULL, NULL }, + /* + * Dynamic shared memory has a higher overhead than local memory contexts, + * so when testing low-memory scenarios that could use shared memory, the + * recommended minimum is 1MB. + */ { {"maintenance_work_mem", PGC_USERSET, RESOURCES_MEM, gettext_noop("Sets the maximum memory to be used for maintenance operations."), @@ -2517,7 +2522,7 @@ struct config_int ConfigureNamesInt[] = GUC_UNIT_KB }, &maintenance_work_mem, - 65536, 1024, MAX_KILOBYTES, + 65536, 64, MAX_KILOBYTES, NULL, NULL, NULL }, diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample index 9ec9f97e926..667e0dc40a2 100644 --- a/src/backend/utils/misc/postgresql.conf.sample +++ b/src/backend/utils/misc/postgresql.conf.sample @@ -139,8 +139,8 @@ # you actively intend to use prepared transactions. #work_mem = 4MB # min 64kB #hash_mem_multiplier = 2.0 # 1-1000.0 multiplier on hash table work_mem -#maintenance_work_mem = 64MB # min 1MB -#autovacuum_work_mem = -1 # min 1MB, or -1 to use maintenance_work_mem +#maintenance_work_mem = 64MB # min 64kB +#autovacuum_work_mem = -1 # min 64kB, or -1 to use maintenance_work_mem #logical_decoding_work_mem = 64MB # min 64kB #max_stack_depth = 2MB # min 100kB #shared_memory_type = mmap # the default is the first option |