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 1s6XPF-000Bvc-HG for pgsql-hackers@arkaria.postgresql.org; Mon, 13 May 2024 15:16:03 +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 1s6XOF-001K9S-29 for pgsql-hackers@arkaria.postgresql.org; Mon, 13 May 2024 15:14:59 +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 1s6XOE-001K9I-N3 for pgsql-hackers@lists.postgresql.org; Mon, 13 May 2024 15:14:58 +0000 Received: from mail1.dalibo.net ([51.159.93.128] helo=mail.dalibo.com) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s6XOC-00010u-2E for pgsql-hackers@lists.postgresql.org; Mon, 13 May 2024 15:14:57 +0000 Received: from [192.168.1.20] (lfbn-ren-1-1137-121.w92-139.abo.wanadoo.fr [92.139.85.121]) by mail.dalibo.com (Postfix) with ESMTPSA id ACF541FC9B; Mon, 13 May 2024 17:14:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dalibo.com; s=a; t=1715613293; bh=2fHm265dmEmCx5kQicEQHVrJNaW9CNgE29+rZ05hq/Y=; h=Date:From:Subject:To:Cc:References:In-Reply-To:From; b=Qu7pScMgmOUwl5720JCf7p/fKpvB+KVPW/nxYh7Rue/PG4rNnj9UOUeB4YrKvLXYM Ng5ogznH2WFAevkG4wN7A/l06r11CgdlAE5zHxpStWcK99YXcdZPGLHuavcxgvJGxT 3aLLJNeL6lgQL+dlQRjlu1T8ySaFFtQ2Rc05jtZI= Message-ID: Date: Mon, 13 May 2024 17:14:53 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: =?UTF-8?Q?Fr=C3=A9d=C3=A9ric_Yhuel?= Subject: Re: New GUC autovacuum_max_threshold ? To: Robert Haas , "Imseih (AWS), Sami" Cc: Nathan Bossart , David Rowley , Joe Conway , Michael Banck , Laurenz Albe , Melanie Plageman , PostgreSQL Hackers References: <662b6941.5d0a0220.ea153.4178@mx.google.com> <06b361a6-094c-4d78-b4c9-b102e270d97e@joeconway.com> <7c91df80-ef1b-426a-a2b3-e11ffb31bcc7@joeconway.com> <20240507211702.GA2720371@nathanxps13> <0A799687-DE0A-4BFC-8900-E1D57EB6C211@amazon.com> Content-Language: fr, en-US Autocrypt: addr=frederic.yhuel@dalibo.com; keydata= xjMEXn3bgxYJKwYBBAHaRw8BAQdA6tX5FT/n5ztMWIoBdl6k5avvu65fv6ryfVzIx/aH3V3N JEYuIFlodWVsIDxmcmVkZXJpYy55aHVlbEBkYWxpYm8uY29tPsKWBBMWCAA+FiEEi7OTyf6H ePS+C6n11XGWhN8zGNUFAmYFjIICGwMFCQln/O0FCwkIBwIGFQoJCAsCBBYCAwECHgECF4AA CgkQ1XGWhN8zGNU8jwD7BQf1+z8S62UH+jgUZPPbqqMaKQu2MNsJd7cV0M+wBMUBAM6Y4GmE YnxOPckuqhrTIA9O8fvWGNVJX1r0XjSs1DQLzjgEXn3bgxIKKwYBBAGXVQEFAQEHQCuh5cLQ AtEBXHa2Fmtp0kduBu7msM7qO/gaEcdjFUdiAwEIB8J+BBgWCAAmAhsMFiEEi7OTyf6HePS+ C6n11XGWhN8zGNUFAmYFjIIFCQln/O0ACgkQ1XGWhN8zGNXsMAD/VYorW/1s3nWJpMOi8RNo 8WZIXCG5Zm5NbKscHWTOm94A/RFjn7bP3dfnU4ioUkG+qY4iLE/t2fE1bd6XxP9BUHYH In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Le 09/05/2024 à 16:58, Robert Haas a écrit : > As I see it, a lot of the lack of agreement up until now is people > just not understanding the math. Since I think I've got the right idea > about the math, I attribute this to other people being confused about > what is going to happen and would tend to phrase it as: some people > don't understand how catastrophically bad it will be if you set this > value too low. FWIW, I do agree with your math. I found your demonstration convincing. 500000 was selected with the wet finger. Using the formula I suggested earlier: vacthresh = Min(vac_base_thresh + vac_scale_factor * reltuples, vac_base_thresh + vac_scale_factor * sqrt(reltuples) * 1000); your table of 2.56 billion tuples will be vacuumed if there are more than 10 million dead tuples (every 28 minutes). If we want to stick with the simple formula, we should probably choose a very high default, maybe 100 million, as you suggested earlier. However, it would be nice to have the visibility map updated more frequently than every 100 million dead tuples. I wonder if this could be decoupled from the vacuum process?