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 1m9DRL-0005b4-O1 for pgsql-bugs@arkaria.postgresql.org; Thu, 29 Jul 2021 21:19:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m9DRK-0004Ur-Hi for pgsql-bugs@arkaria.postgresql.org; Thu, 29 Jul 2021 21:19:38 +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 1m9DRJ-0004Uj-V4 for pgsql-bugs@lists.postgresql.org; Thu, 29 Jul 2021 21:19:38 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m9DRG-0007cf-FG for pgsql-bugs@lists.postgresql.org; Thu, 29 Jul 2021 21:19:37 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 009953200437; Thu, 29 Jul 2021 17:19:30 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 29 Jul 2021 17:19:31 -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=oxC12JyWOVs/3HTEScf0iq0WTYX56xu1jSVRUV7VlwM=; b=aNvKVoFn juXfmxTjzMg+mXcjrG8Pb1vTMPJyuKBt1D+3BfS1ZBQar+tQrjxFVCt625onZy15 dnbOE2C7QHNnZ6y4B6hGk4dMhkSJcQpEjjUM/7jz9zpfTA6QavujrHDm1fNqbxbU zGfMinrtNyvLoB01ego0SR9V2osJBmZhkdkwSFJdSKULXFVhMnsnyvUSNBcIuwtX 9Qg+zy1itTL6832vu446MXoF5xzYuetKlMhrWXtl11UuyCsWXG2Z4yVC8qTEN3QL pxiN2WXfS+1vlBjeaGHciCJZVjnM5IyzLDI0JC4v09QFNKDJDkaffp1MGCy9Cz+U C73IpfTQO1pVGg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrheefgdduuddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkgggtugfgjgesthekre dttddtjeenucfhrhhomheptehlvhgrrhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgv segrlhhvhhdrnhhoqdhiphdrohhrgheqnecuggftrfgrthhtvghrnhepudejveejffejve duudetvdekieeuiedtvdeileefkeevjedufeeguedvjefhueelnecuffhomhgrihhnpegv nhhtvghrphhrihhsvggusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrh grmhepmhgrihhlfhhrohhmpegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 29 Jul 2021 17:19:29 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 03D6A2A09BD; Thu, 29 Jul 2021 17:19:25 -0400 (-04) Date: Thu, 29 Jul 2021 17:19:24 -0400 From: Alvaro Herrera To: Kyotaro Horiguchi Cc: tgl@sss.pgh.pa.us, 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: <202107292119.l3ts46r3f2vc@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210729.165007.1956564330541804824.horikyota.ntt@gmail.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021-Jul-29, Kyotaro Horiguchi wrote: > At Thu, 29 Jul 2021 16:20:38 +0900 (JST), Kyotaro Horiguchi wrote in > > So it seems to me we need to explicitly prevent unexpected checkpoints > > from happening maybe by enlarging max_wal_size temporily. > > I ended up with the attached. It causes a checkpoint reliably exactly > at the aimed timing without. Thanks for looking into it. The explanation makes sense, so I pushed your patch and also fixed one outdated comment I noticed while reading the related code. I hope this commit will solve the problem ... it is quite low probability, so we'll have to wait at least two weeks to make any conclusion. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/