Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mSJ3I-0006xo-RU for pgsql-docs@arkaria.postgresql.org; Mon, 20 Sep 2021 13:09:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mSJ3H-0000jh-N7 for pgsql-docs@arkaria.postgresql.org; Mon, 20 Sep 2021 13:09:43 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mSJ3H-0000jZ-Ci for pgsql-docs@lists.postgresql.org; Mon, 20 Sep 2021 13:09:43 +0000 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mSJ3E-0005Ta-Gs for pgsql-docs@lists.postgresql.org; Mon, 20 Sep 2021 13:09:42 +0000 Received: by mail-wr1-x42a.google.com with SMTP id u15so29559648wru.6 for ; Mon, 20 Sep 2021 06:09:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20210112.gappssmtp.com; s=20210112; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=6OVlzLQ9qes5FfoZIOolsKZpZ1DFCYSMB3mop/WzbMI=; b=DRKLRGk56eLbReSMSosQm5q50VlBxl+SiyBQrFnizwQY8N+LkJlZ8e59Gxg4AwMONX e1od8l0oqrjy3QhAMHGGCCSEVSuhvfZoQeWJM/xekqAOGOMNf/M1mHrTn58jILjF4lPZ cO+CV7SG9UKff9imJ2n2TIWF/Nf9pLfrwNRfeeDWfmO+q67c+JFSVn1ioQdu/HzsxmHc UrbTnLIdxDmCRlhgNa91UbYFm2kEmFJeX7U7jU0CwRNMUSW9Oiip9+js87+9BWnkxgZ3 NGBA85XbYa1qqoPRSQWJN9mimHT/jGWQmhOsPli7M6NhCoeAljzfDAVosqgNgI72bY7e 8XnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=6OVlzLQ9qes5FfoZIOolsKZpZ1DFCYSMB3mop/WzbMI=; b=Hs2cDpe6EOZhHscRTF7lt/N/E7twVLUeVnCBSOp5F1hxt4z/mG8sFqQ0RFH0wxRscy 090qhnwY+QfduCfIcmwKcX7SMhRnKYjRxQbjw6KGxPHH0GSSRc/BIc9ZPADwQVQAcoLc 5CMrvPQRkD1C8gJ5SwP9WprId3Oa9Vf7n7TdYC9lmzuSxP5fZ7KMJdpzJM6CDkkErcEb MNP1qOa7pShUaJ8MmVNIsxxFP7KjjVqQETFGjKaGDtRhrm+mbOBYCA8wPXysEB9bicmu oBS/b/G/BmwqGNz5Bj4Zd6b6QHMdjGmM3jx1u35bEQTk9ojlofNcSPPGfbuEWQAFAxOW 7Law== X-Gm-Message-State: AOAM530wlwF3M2kC31Sg876sTM6QTtAv+/DBuvKKmjnR0fXVUsDs2BtD lR4Pq05gdBTH+Q5VD3ljPCPlVA== X-Google-Smtp-Source: ABdhPJxjriWJ0CFQ3vh5oRVFWIeOGwsAGJ2oPtT8h4IO6Vzr4SIPemxBSFGqOC5OVn8cw12FZ6lauw== X-Received: by 2002:a05:600c:190c:: with SMTP id j12mr21897837wmq.122.1632143378216; Mon, 20 Sep 2021 06:09:38 -0700 (PDT) Received: from localhost.localdomain ([88.116.133.170]) by smtp.gmail.com with ESMTPSA id o19sm7151650wrg.60.2021.09.20.06.09.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Sep 2021 06:09:37 -0700 (PDT) Message-ID: Subject: Re: Missing mention of autovacuum_work_mem From: Laurenz Albe To: "nikolai.berkoff" , "pgsql-docs@lists.postgresql.org" Date: Mon, 20 Sep 2021 15:09:36 +0200 In-Reply-To: <1kIqf6Q1G-wVkQkeg_BRSpcmy77hNfh9vlLQ3AF1APT-pKHRYT3z1IuDC5K2w83-4Qa016V1SfWJfF1v0Z0qf6141DbLcpIZJY3edlBEkCs=@pm.me> References: <1kIqf6Q1G-wVkQkeg_BRSpcmy77hNfh9vlLQ3AF1APT-pKHRYT3z1IuDC5K2w83-4Qa016V1SfWJfF1v0Z0qf6141DbLcpIZJY3edlBEkCs=@pm.me> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.4 (3.40.4-1.fc34) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, 2021-09-20 at 08:07 +0000, nikolai.berkoff wrote: > I can see in > src/backend/access/heap/vacuumlazy.c > that compute_max_dead_tuples uses autovacuum_work_mem when it is given. > > The "vacuuming indexes" documentation has: > > > "If a table has any indexes, this will happen at least once per vacuum, > > after the heap has been completely scanned. It may happen multiple times per > > vacuum if maintenance_work_mem is insufficient to store the number of dead > > tuples found." Your suggested change is: > "If a table has any indexes, this will happen at least once per vacuum, > after the heap has been completely scanned. It may happen multiple times per > vacuum if the memory is insufficient to store the number of dead > tuples found. The memory is set via the maintenance_work_mem unless > it is an autovacuum then autovacuum_work_mem will be used." Why not keep it simple with "If a table has any indexes, this will happen at least once per vacuum, after the heap has been completely scanned. It may happen multiple times per vacuum if maintenance_work_mem (or, in the case of autovacuum, autovacuum_work_mem) is insufficient to store the number of dead tuples found." Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com