Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tXkPN-00Db3s-Tr for pgsql-hackers@arkaria.postgresql.org; Tue, 14 Jan 2025 17:08:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tXkPM-002HiJ-J1 for pgsql-hackers@arkaria.postgresql.org; Tue, 14 Jan 2025 17:08:53 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tXkPM-002HiB-8k for pgsql-hackers@lists.postgresql.org; Tue, 14 Jan 2025 17:08:52 +0000 Received: from mail-lj1-x22a.google.com ([2a00:1450:4864:20::22a]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tXkPL-000O6x-26 for pgsql-hackers@lists.postgresql.org; Tue, 14 Jan 2025 17:08:51 +0000 Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-3003e203acaso43112261fa.1 for ; Tue, 14 Jan 2025 09:08:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736874528; x=1737479328; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=SnKK+A8zXBeBEqIc9pGawJdu5mEc7t/QKcAB3304k1k=; b=c/TWW3Ztp0BTHYRTs49C6iUfX+u78agY0aCfe2gM3qXkywjRXW85Q8A9mUvB8seW9N 10y3MOOxFyMZdE9nkvzpvhMbyESmte+8WMVzHObX1+2t4Vb/E+4HpGV8uVAi0Nn2o0Ni XESqLxnEP1LX1md9U9nCtpUKIAXfhV1XB+hVgzVrTEgfjSrAdTWZ3eufWxjYvi+dX7bO vXaH8QZrsXFWC31bBWM2/Z0QnVbwjKYJ+FifNZtJ6y5ZvsIdZfswcdGe6uF6yUZjDVPR 7x6e7UbtWr6q57+8uckPHRKp8rqXMoGJD7xbTnMOknD9jZSGDMXLlC/UfcMIrCsM+nl5 dY6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736874528; x=1737479328; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=SnKK+A8zXBeBEqIc9pGawJdu5mEc7t/QKcAB3304k1k=; b=doz3jcWxFpMUN6Jav7bpfTzMXJMWTrv/9tp/eo7406DCat1zaegptuwp54TvSvB+VR rv+SPngs0zEvf5mYJLvoJqIwRTBKhI8x5VuJTsTpWRQYi/V1f4HpGXjLNE2AB08RMw3D YmdATSaAWmILG/95tyglkc0HwZydsxmU4eEcxYm6ASknDFset400RcEX81gRhdLTWi5D 82q/tBek3EOW16YStLh2s2ThhXMIIP+va+Hh5kQsYgHgk9ZofFrBFJTaUxEsiSFHFWkF BQk8913cza9PrTf38B/8gM1y78CnM1T/dJE7saBTpwUZLmO848vWrfTWGmTve7FrKAaU TErQ== X-Forwarded-Encrypted: i=1; AJvYcCUMGxzkFfmuY8B2Kkz7l3HTy/MAho+hybmQoUZJWXXm2L6oL3WejGQsCaBOA2jXuZj/HIVE8xM+fJt6oA1/@lists.postgresql.org X-Gm-Message-State: AOJu0Yx7ZyEDhVXXtTsIGWa2Y/fDNHv/zz1lBiWYDkJotE96sz/buTUl P3gaotYyFPPs78TD5PQa72GoUQI4vXQa3D8dzLbKXR9WIrQrPZdfs5oQBOf3T4XCgJOFOrZtVwn B8yDGoSJGqAFjEiTrfnSix5c9QEM= X-Gm-Gg: ASbGncvo9s7lc1moihO+qPUptg0xr3YkAYaJ/uFGCo9ZRoDJjueKjVq3yt3V3knrV2C H59mn1+dcbp3jyTn081u/0yxMpBcdqtiaOFbG X-Google-Smtp-Source: AGHT+IGfO4ukiph1L2EwR3JMzuaxTUD99fyOh+aRnZaRqVq/H59XZoAOH7m1yKZL7WEHG7bKmDhHlu7ukRwkV1PlKlo= X-Received: by 2002:a2e:b888:0:b0:302:350c:c630 with SMTP id 38308e7fff4ca-305f45e1551mr95072661fa.22.1736874528069; Tue, 14 Jan 2025 09:08:48 -0800 (PST) MIME-Version: 1.0 References: <2ca7f9c7-5da9-46cb-9072-39b71bfab948@dalibo.com> <93f3dab5-caa4-4213-9be0-855d5aaa19bf@dalibo.com> In-Reply-To: From: Sami Imseih Date: Tue, 14 Jan 2025 11:08:36 -0600 X-Gm-Features: AbW1kvau6TYQBOrkbge_y6jLW4S67VAI3qywwOrym-wYAe4GtgCQreD1GIqfG_8 Message-ID: Subject: Re: New GUC autovacuum_max_threshold ? To: Nathan Bossart , =?UTF-8?B?RnLDqWTDqXJpYyBZaHVlbA==?= Cc: Robert Treat , wenhui qiu , Robert Haas , "Imseih (AWS), Sami" , David Rowley , Joe Conway , Michael Banck , Laurenz Albe , Melanie Plageman , PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > Good call. Here is an updated patch. thanks for the update! After staring at the documentation for a while, I am now wondering whether we are adequately describing the rationale for this GUC. The GUC documentation mentions that this is a 'cap on the value calculated with autovacuum_vacuum_threshold and autovacuum_vacuum_scale_factor,' which is acceptable; however, I think further elaboration is necessary in routine-vacuuming.html#AUTOVACUUM. This is because scale_factor and threshold are already well-known and widely understood parameters, and introducing a third one to the mix deserves a bit more of an explanation. What do you think? Based on my understanding of the discussion, the purpose of the GUC is to prevent large tables from experiencing extended periods without an autovacuum, particularly because scale_factor triggers vacuuming less frequently as the table grows. Currently, users can handle such cases by disabling (or lowering) autovacuum_vacuum_scale_factor and setting an appropriate autovacuum_vacuum_threshold; Therefore, this GUC becomes a more convenient and predictable way to ensure autovacuum triggers on a large table. Is this correct? Regards, Sami