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:52:56 +0700
commitbbf668d66fbf61d45f1c187b08a5f51537bfb7c7 (patch)
treefbd601cfdf04291dbd407c28a18ac47ed970bf4a /src/backend/utils/misc/guc_tables.c
parentf5a1311fccd2ed24a9fb42aa47a17d1df7126039 (diff)
downloadpostgresql-bbf668d66fbf61d45f1c187b08a5f51537bfb7c7.tar.gz
postgresql-bbf668d66fbf61d45f1c187b08a5f51537bfb7c7.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 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
},