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 1ps97X-0001bS-EM for pgsql-hackers@arkaria.postgresql.org; Thu, 27 Apr 2023 21:25:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ps97V-00089c-S2 for pgsql-hackers@arkaria.postgresql.org; Thu, 27 Apr 2023 21:25:41 +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 1ps97V-00089T-IP for pgsql-hackers@lists.postgresql.org; Thu, 27 Apr 2023 21:25:41 +0000 Received: from smtp.outgoing.loopia.se ([93.188.3.37]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ps97P-002F08-S7 for pgsql-hackers@postgresql.org; Thu, 27 Apr 2023 21:25:40 +0000 Received: from s807.loopia.se (localhost [127.0.0.1]) by s807.loopia.se (Postfix) with ESMTP id C28D92F7650A for ; Thu, 27 Apr 2023 23:25:32 +0200 (CEST) Received: from s934.loopia.se (unknown [172.22.191.5]) by s807.loopia.se (Postfix) with ESMTP id B195D2E29886; Thu, 27 Apr 2023 23:25:32 +0200 (CEST) Received: from s472.loopia.se (unknown [172.22.191.5]) by s934.loopia.se (Postfix) with ESMTP id AD4E17CEA53; Thu, 27 Apr 2023 23:25:32 +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 s979.loopia.se ([172.22.191.5]) by s472.loopia.se (s472.loopia.se [172.22.190.12]) (amavisd-new, port 10024) with LMTP id 1MQJUKfVY6L8; Thu, 27 Apr 2023 23:25:32 +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 s979.loopia.se (Postfix) with ESMTPSA id B0AB610BC341; Thu, 27 Apr 2023 23:25:31 +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: Thu, 27 Apr 2023 23:25:30 +0200 Cc: Masahiko Sawada , John Naylor , Robert Haas , Andres Freund , Tom Lane , Kyotaro Horiguchi , PostgreSQL Hackers , Amit Kapila Content-Transfer-Encoding: quoted-printable Message-Id: <7A5D2190-5BF3-45F6-AE54-471D23C0CF1B@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> <2B703533-102A-47E5-A4F7-C6A68C09BB27@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 27 Apr 2023, at 16:53, Melanie Plageman = wrote: > On Thu, Apr 27, 2023 at 8:55=E2=80=AFAM Daniel Gustafsson = wrote: >>=20 >>> On 27 Apr 2023, at 14:10, Masahiko Sawada = wrote: >>> Good catch. I think the problem is that vacuum_rel() is called >>> recursively and we don't reset VacuumFailsafeActive before vacuuming >>> the toast table. I think we should reset it in heap_vacuum_rel() >>> instead of Assert(). It's possible that we trigger the failsafe mode >>> only for either one.Please find the attached patch. >>=20 >> Agreed, that matches my research and testing, I have the same diff = here and it >> passes testing and works as intended. This was briefly discussed in = [0] and >> slightly upthread from there but then missed. I will do some more = looking and >> testing but I'm fairly sure this is the right fix, so unless I find = something >> else I will go ahead with this. >>=20 >> xid_wraparound is a really nifty testing tool. Very cool.Makes sense = to me too. >=20 > Fix LGTM. Thanks for review. I plan to push this in the morning. > Though we previously set it to false before this series of patches, > perhaps it is > worth adding a comment about why VacuumFailsafeActive must be reset = here > even though we reset it before vacuuming each table? Agreed.=20 -- Daniel Gustafsson