aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/misc/guc_tables.c
diff options
context:
space:
mode:
authorJohn Naylor <john.naylor@postgresql.org>2024-08-06 20:38:33 +0700
committerJohn Naylor <john.naylor@postgresql.org>2024-08-10 14:59:13 +0700
commit2eda3df9ad532a051976937cfc17d6c52bbdacd6 (patch)
treecc0a53084efdc5bbe2253f9a388159dd2dbae2d2 /src/backend/utils/misc/guc_tables.c
parent6bec76faa4bd7eda34f213f0831d77506d66147c (diff)
downloadpostgresql-2eda3df9ad532a051976937cfc17d6c52bbdacd6.tar.gz
postgresql-2eda3df9ad532a051976937cfc17d6c52bbdacd6.zip
Lower minimum maintenance_work_mem to 64kB
Since the introduction of TID store, vacuum uses far less memory in the common case than in versions 16 and earlier. Invoking multiple rounds of index vacuuming in turn requires a much larger table. It'd be a good idea anyway to cover this case in regression testing, and a lower limit is less painful for slow buildfarm animals. The reason to do it now is to re-enable coverage of the bugfix in commit 83c39a1f7f. For consistency, give autovacuum_work_mem the same treatment. Suggested by Andres Freund Tested by Melanie Plageman Backpatch to v17, where TID store was introduced Discussion: https://postgr.es/m/20240516205458.ohvlzis5b5tvejru@awork3.anarazel.de Discussion: https://postgr.es/m/20240722164745.fvaoh6g6zprisqgp%40awork3.anarazel.de
Diffstat (limited to 'src/backend/utils/misc/guc_tables.c')
-rw-r--r--src/backend/utils/misc/guc_tables.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/backend/utils/misc/guc_tables.c b/src/backend/utils/misc/guc_tables.c
index 319f6d7cc02..60887d09c46 100644
--- a/src/backend/utils/misc/guc_tables.c
+++ b/src/backend/utils/misc/guc_tables.c
@@ -2447,6 +2447,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."),
@@ -2454,7 +2459,7 @@ struct config_int ConfigureNamesInt[] =
GUC_UNIT_KB
},
&maintenance_work_mem,
- 65536, 1024, MAX_KILOBYTES,
+ 65536, 64, MAX_KILOBYTES,
NULL, NULL, NULL
},