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 1pkYiJ-000738-Nk for pgsql-hackers@arkaria.postgresql.org; Thu, 06 Apr 2023 23:08:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pkYiI-0002Jx-LB for pgsql-hackers@arkaria.postgresql.org; Thu, 06 Apr 2023 23:08:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pkYiI-0002Jo-Am for pgsql-hackers@lists.postgresql.org; Thu, 06 Apr 2023 23:08:18 +0000 Received: from smtp.outgoing.loopia.se ([93.188.3.37]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pkYiB-001KZo-HV for pgsql-hackers@postgresql.org; Thu, 06 Apr 2023 23:08:17 +0000 Received: from s807.loopia.se (localhost [127.0.0.1]) by s807.loopia.se (Postfix) with ESMTP id A9F6B2F5D72C for ; Fri, 7 Apr 2023 01:08:10 +0200 (CEST) Received: from s979.loopia.se (unknown [172.22.191.5]) by s807.loopia.se (Postfix) with ESMTP id 997C82E270B3; Fri, 7 Apr 2023 01:08:10 +0200 (CEST) Received: from s898.loopia.se (unknown [172.22.191.5]) by s979.loopia.se (Postfix) with ESMTP id 94F6310BC347; Fri, 7 Apr 2023 01:08:10 +0200 (CEST) X-Virus-Scanned: amavisd-new at amavis.loopia.se X-Spam-Flag: NO X-Spam-Score: -1 X-Spam-Level: X-Spam-Status: No, score=-1 tagged_above=-999 required=6.2 tests=[ALL_TRUSTED=-1] autolearn=disabled Received: from s981.loopia.se ([172.22.191.5]) by s898.loopia.se (s898.loopia.se [172.22.190.17]) (amavisd-new, port 10024) with LMTP id lEDGdg4kFmR2; Fri, 7 Apr 2023 01:08:10 +0200 (CEST) X-Loopia-Auth: user X-Loopia-User: daniel@yesql.se X-Loopia-Originating-IP: 89.255.232.193 Received: from smtpclient.apple (customer-89-255-232-193.stosn.net [89.255.232.193]) (Authenticated sender: daniel@yesql.se) by s981.loopia.se (Postfix) with ESMTPSA id F3EA522B1681; Fri, 7 Apr 2023 01:08:09 +0200 (CEST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.2\)) Subject: Re: Should vacuum process config file reload more often From: Daniel Gustafsson In-Reply-To: Date: Fri, 7 Apr 2023 01:08:09 +0200 Cc: Robert Haas , Andres Freund , Tom Lane , Masahiko Sawada , Kyotaro Horiguchi , PostgreSQL Hackers , Amit Kapila Content-Transfer-Encoding: quoted-printable Message-Id: <2B703533-102A-47E5-A4F7-C6A68C09BB27@yesql.se> References: <20230329.132155.629765142788133576.horikyota.ntt@gmail.com> <20230329.173456.1185961934810139447.horikyota.ntt@gmail.com> <935191FB-083B-4060-89FC-466F61FAA391@yesql.se> <1252075.1680547394@sss.pgh.pa.us> <20230403190837.qubpnwugfe2k2g46@awork3.anarazel.de> <7E06F879-7E20-4A6A-862F-CA72CDC9A323@yesql.se> <5028847C-937A-4CC2-B127-AFF5F9FB79C5@yesql.se> To: Melanie Plageman X-Mailer: Apple Mail (2.3696.120.41.1.2) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 7 Apr 2023, at 00:12, Melanie Plageman = wrote: >=20 > On Thu, Apr 6, 2023 at 5:45=E2=80=AFPM Daniel Gustafsson = wrote: >>=20 >>> On 6 Apr 2023, at 23:06, Melanie Plageman = wrote: >>=20 >>> Autovacuum workers, at the end of VacuumUpdateCosts(), check if cost >>> limit or cost delay have been changed. If they have, they assert = that >>> they don't already hold the AutovacuumLock, take it in shared mode, = and >>> do the logging. >>=20 >> Another idea would be to copy the values to local temp variables = while holding >> the lock, and release the lock before calling elog() to avoid holding = the lock >> over potential IO. >=20 > Good idea. I've done this in attached v19. > Also I looked through the docs and everything still looks correct for > balancing algo. I had another read-through and test-through of this version, and have = applied it with some minor changes to comments and whitespace. Thanks for the = quick turnaround times on reviews in this thread! I opted for keeping the three individual commits, squashing them didn't = seem helpful enough to future commitlog readers and no other combination of = the three made more sense than what has been in the thread. -- Daniel Gustafsson