From 3f3c783c025e2a931bb766dc6d13c7186c957ebc Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Mon, 6 Jan 2025 16:09:49 -0600 Subject: [PATCH v1 1/1] lower default of autovacuum_worker_slots to 5 --- doc/src/sgml/config.sgml | 2 +- src/backend/utils/misc/guc_tables.c | 2 +- src/backend/utils/misc/postgresql.conf.sample | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 740ff5d5044..4fda5e6ae79 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -8639,7 +8639,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; Specifies the number of backend slots to reserve for autovacuum worker - processes. The default is 16. This parameter can only be set at server + processes. The default is 5. This parameter can only be set at server start. diff --git a/src/backend/utils/misc/guc_tables.c b/src/backend/utils/misc/guc_tables.c index c9d8cd796a8..c75359b6bc4 100644 --- a/src/backend/utils/misc/guc_tables.c +++ b/src/backend/utils/misc/guc_tables.c @@ -3472,7 +3472,7 @@ struct config_int ConfigureNamesInt[] = NULL }, &autovacuum_worker_slots, - 16, 1, MAX_BACKENDS, + 5, 1, MAX_BACKENDS, NULL, NULL, NULL }, { diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample index b2bc43383db..c7d3852c040 100644 --- a/src/backend/utils/misc/postgresql.conf.sample +++ b/src/backend/utils/misc/postgresql.conf.sample @@ -661,7 +661,7 @@ #autovacuum = on # Enable autovacuum subprocess? 'on' # requires track_counts to also be on. -autovacuum_worker_slots = 16 # autovacuum worker slots to allocate +autovacuum_worker_slots = 5 # autovacuum worker slots to allocate # (change requires restart) #autovacuum_max_workers = 3 # max number of autovacuum subprocesses #autovacuum_naptime = 1min # time between autovacuum runs -- 2.39.5 (Apple Git-154)