Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g5dTp-000628-AD for pgsql-docs@arkaria.postgresql.org; Thu, 27 Sep 2018 21:05:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g5dTn-00047Q-C9 for pgsql-docs@arkaria.postgresql.org; Thu, 27 Sep 2018 21:05:47 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g5dTn-00047G-3A for pgsql-docs@lists.postgresql.org; Thu, 27 Sep 2018 21:05:47 +0000 Received: from mail-qk1-x742.google.com ([2607:f8b0:4864:20::742]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1g5dTj-0001av-W5 for pgsql-docs@lists.postgresql.org; Thu, 27 Sep 2018 21:05:45 +0000 Received: by mail-qk1-x742.google.com with SMTP id 204-v6so1886374qkd.5 for ; Thu, 27 Sep 2018 14:05:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=Aw94CbyTPVdrChxApMlsMlMcdd9do0aBPDy1QBLJi3I=; b=roEzXjERRnuxUmWFfMmblKEIht77lttLRqQP1E8/4uY5di8kED9wNBtlmHGSjNoAxk kZPXqagpwRHgD3Zc5DHN4QmkxnWEqbZxjfkU7bsHefHwGs9CRYFLtmwSl8/akHluB/sD 4z4mTJbrjoyKEYqUyZwxC9eP9K7+370cCa7dSsfQbft6odda/pX+eGPT5nRyP9V5R8NK ASAliICwUBOsZux0yGChU//dNkfw4ZsIZSPHxJQljXvB/5gPG5k80OQjfWWoqfgk6+ZQ KT+DljyQttGbsYZMtJZPoxp0zliiYHzxEoBPSUuKEXOADLPgk45V0B76+4dcMqWtrX2T ngnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=Aw94CbyTPVdrChxApMlsMlMcdd9do0aBPDy1QBLJi3I=; b=Py05EvGrAknHn/yobyf0I5m2bgSYQdK/UCxVATHZJU8sOTg3uZyOCOFNWzyyGinqHR 3U/cqYBuEQUc1xIfhTu2BXlnbQSTZLfmqcvhjvmTgbtXExlTV5eMS2HqaaUK03k33D4j WrbBhZisVOcIKW0uJsIa0PljtTR9Fzy1946JW/8Eu1MTjMnjlzd5kNaMsCvVF56lU7lx AFnE1wSuj01Ac10GFxbJx80CXgJEjSc6CWrX0ax+VXzl1Gd0erMjGcpl5E0BVlaXcSXB +7WxMP/CUwQX6HwQZ39lB0ug5wHCxksN2TOiVodnF6OaDKl94Se87h2f91IN1bV+D72T zCgw== X-Gm-Message-State: ABuFfoghjVgLQ0bWFo4MF6IQr17NX+NFaFKZA/1aE+/ygOElv0fNqptr HLzlzeYC7fY9wOcBjwtk79ZY0yyRUcc= X-Google-Smtp-Source: ACcGV61RLrRryRHqasOF/Dq8tn/SifId8persMOteV55+KChv+Y4Nslzj7jKouegNqLtxoOvoCJq1A== X-Received: by 2002:a37:afc5:: with SMTP id y188-v6mr9470199qke.273.1538082343012; Thu, 27 Sep 2018 14:05:43 -0700 (PDT) Received: from alvin.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id r73-v6sm1758652qke.78.2018.09.27.14.05.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Sep 2018 14:05:42 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 5994670B; Thu, 27 Sep 2018 18:05:40 -0300 (-03) Date: Thu, 27 Sep 2018 18:05:40 -0300 From: Alvaro Herrera To: martin.marques@gmail.com, pgsql-docs@lists.postgresql.org Subject: Re: Incorrect description of autovacuum_vacuum_threshold and autovacuum_vacuum_scale_factor Message-ID: <20180927210540.od23ee3aq4bpkbpj@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <153807973105.1233.5572348777789365646@wrigleys.postgresql.org> User-Agent: NeoMutt/20180716 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2018-Sep-27, PG Doc comments form wrote: > Page: https://www.postgresql.org/docs/10/static/runtime-config-autovacuum.html > > This page lists the different autovacuum options. Describing > autovacuum_vacuum_threshold and autovacuum_vacuum_scale_factor independently > adds confusion unless you are also reading > https://www.postgresql.org/docs/10/static/routine-vacuuming.html#AUTOVACUUM > where we have a formula for the threshold and scale factor. True. > I suggest adding a reference for each one of the two parameters with a link > to the "Routine Vacuuming" section. I suggest adding "This number is added to the number coming from the autovacuum_vacuum_scale_factor parameter for each table" just before the "This parameter can only be set" phrase. So we'd end up with this: autovacuum_vacuum_threshold (integer) Specifies the minimum number of updated or deleted tuples needed to trigger a VACUUM in any one table. The default is 50 tuples. This number is added to the number coming from the autovacuum_vacuum_scale_factor parameter for each table. This parameter can only be set in the postgresql.conf file or on the server command line; but the setting can be overridden for individual tables by changing table storage parameters. autovacuum_vacuum_scale_factor (floating point) Specifies a fraction of the table size to add to autovacuum_vacuum_threshold when deciding whether to trigger a VACUUM. The default is 0.2 (20% of table size). This number is added to the autovacuum_vacuum_threshold parameter for each table. This parameter can only be set in the postgresql.conf file or on the server command line; but the setting can be overridden for individual tables by changing table storage parameters. Same for the analyze parameters. I suppose we don't need any updates to the section of https://www.postgresql.org/docs/10/static/sql-createtable.html that explains the equivalent reloptions, since those ones are very succint anyway. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services