diff options
author | John Naylor <john.naylor@postgresql.org> | 2024-08-06 20:38:33 +0700 |
---|---|---|
committer | John Naylor <john.naylor@postgresql.org> | 2024-08-10 14:52:56 +0700 |
commit | bbf668d66fbf61d45f1c187b08a5f51537bfb7c7 (patch) | |
tree | fbd601cfdf04291dbd407c28a18ac47ed970bf4a /src/backend/postmaster/autovacuum.c | |
parent | f5a1311fccd2ed24a9fb42aa47a17d1df7126039 (diff) | |
download | postgresql-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/postmaster/autovacuum.c')
-rw-r--r-- | src/backend/postmaster/autovacuum.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/postmaster/autovacuum.c b/src/backend/postmaster/autovacuum.c index 4e4a0ccbefb..7d0877c95ec 100644 --- a/src/backend/postmaster/autovacuum.c +++ b/src/backend/postmaster/autovacuum.c @@ -3339,12 +3339,12 @@ check_autovacuum_work_mem(int *newval, void **extra, GucSource source) return true; /* - * We clamp manually-set values to at least 1MB. Since + * We clamp manually-set values to at least 64kB. Since * maintenance_work_mem is always set to at least this value, do the same * here. */ - if (*newval < 1024) - *newval = 1024; + if (*newval < 64) + *newval = 64; return true; } |