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 1m4Dum-0007vW-Mk for pgsql-bugs@arkaria.postgresql.org; Fri, 16 Jul 2021 02:49:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m4Dul-0005WA-Bh for pgsql-bugs@arkaria.postgresql.org; Fri, 16 Jul 2021 02:49:23 +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 1m4Duj-0005W1-Q9 for pgsql-bugs@lists.postgresql.org; Fri, 16 Jul 2021 02:49:22 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m4Dug-0006Aa-1K for pgsql-bugs@lists.postgresql.org; Fri, 16 Jul 2021 02:49:20 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id A0B105C0151; Thu, 15 Jul 2021 22:49:15 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Thu, 15 Jul 2021 22:49:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=9VUF/qZiGha3etQjDC1dTZEX0miuXpXs9C9B+RUeYB8=; b=llxKKPma kG0c86+6AJ+GqUugP83RTBFNmb1QwJetvionuotbmziTMh+NE3Q2PXC8FHJQab5s 0skSN/kIxUmNb6t562ZJxir6ifkEKeeC1CIw+yd3LE+4XzsEcvY9ZFUzsPSAYCl2 BCQ2tkc3c6VzCnfl+aFTiZFflufSqFvfthTAdsM5rcmPCMvVl4iwUHRjVk8sDQf2 QLu9VOTcKfLYwnabvvDkr6tlJq3hmcKZch9skuuHF6z+F1YyKZZw4GD8z9czrTgg 5jd3fximGM0rEr4M1VnICNsG52z/nk9uvsMomcupLcIoiZvRRWz9OuXChW7DksLC FTUpPoK8G8582A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddvgdehjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfggtggugfgjsehtkeertd dttdejnecuhfhrohhmpeetlhhvrghrohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvges rghlvhhhrdhnohdqihhprdhorhhgqeenucggtffrrghtthgvrhhnpedujeevjeffjeevud dutedvkeeiueeitddvieelfeekveejudefgeeuvdejhfeuleenucffohhmrghinhepvghn thgvrhhprhhishgvuggsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomheprghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 15 Jul 2021 22:49:14 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 9E2EA2A099B; Thu, 15 Jul 2021 22:49:11 -0400 (-04) Date: Thu, 15 Jul 2021 22:49:11 -0400 From: Alvaro Herrera To: Kyotaro Horiguchi Cc: jeff.janes@gmail.com, mk@071.ovh, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17103: WAL segments are not removed after exceeding max_slot_wal_keep_size Message-ID: <202107160249.fjlmpg6vu3j5@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210716.110500.137369520113769822.horikyota.ntt@gmail.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021-Jul-16, Kyotaro Horiguchi wrote: > It's because another checkpoint is running at the time the manual > checkpoint just before is invoked. Two successive checkpoint hides > the defect. The checkpoint works as the rendezvous point for the > succeeding tests so I added another sync point instead of the manual > checkpoint. The test in the attached correctly fails if _logSegNo > were not updated by slot invalidation. OK, I thought as much and tried to catch it in the act but couldn't. Your explanation makes sense. > By the way, about the previous version, XLByteToSeg is needed since > KeepLogSeg doesn't advance _logSegNo, which is the wanted action > here. The test in the attached fails if only KeepLogSeg is called > again. Oh, true. > I confirmed that *the previous* version of the test works for Windows. > (So there's no reason that the current version doesn't work.) Great, thanks. -- Álvaro Herrera Valdivia, Chile — https://www.EnterpriseDB.com/ "Siempre hay que alimentar a los dioses, aunque la tierra esté seca" (Orual)