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 1m48IO-0006UL-CJ for pgsql-bugs@arkaria.postgresql.org; Thu, 15 Jul 2021 20: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 1m48IM-0004mw-Ku for pgsql-bugs@arkaria.postgresql.org; Thu, 15 Jul 2021 20:49:22 +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 1m48IL-0004mh-RB for pgsql-bugs@lists.postgresql.org; Thu, 15 Jul 2021 20:49:22 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m48II-0000r3-Fr for pgsql-bugs@lists.postgresql.org; Thu, 15 Jul 2021 20:49:21 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 840A33200983; Thu, 15 Jul 2021 16:49:14 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 15 Jul 2021 16:49:14 -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=VT1qrjTjck3/l+YCibsxI/tUhHU6TuOhrwGCSCeiG6M=; b=B0/zGkPs BH84ddDDd9ZR6TrmZsRwcLQiX3NKr6jR97BMpA4k03kn1WHa535rSuIk15GTo8x4 yg891qtQkRIlBdauReamkukh5W5Fogd84WYZkI1/GplJadTJ6bEuqKIrURg6kkCW n3vuL3k33XkezL3Ae4Fvu7Yg8O4sr5JoMJUc+dGA9WKMmVj/jxx5cQdZv0+rt3bD 93REMCuMde0a26fWbdlHZEc2vtPnfFyU9SShv4QhOOajmBy4RuBghKCy77k+iDhR sFbzlqLLSk+0kZrEZMshxEM5AVzt7eG5PdpyMoo9aqGb+Q+xsUYTrTp+v+77RbmZ 0jhj/3K1xyJPCg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddugdduhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfggtggugfgjsehtkeertd dttdejnecuhfhrohhmpeetlhhvrghrohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvges rghlvhhhrdhnohdqihhprdhorhhgqeenucggtffrrghtthgvrhhnpedujeevjeffjeevud dutedvkeeiueeitddvieelfeekveejudefgeeuvdejhfeuleenucffohhmrghinhepvghn thgvrhhprhhishgvuggsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomheprghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 15 Jul 2021 16:49:13 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id DDB432A099B; Thu, 15 Jul 2021 16:49:10 -0400 (-04) Date: Thu, 15 Jul 2021 16:49:10 -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: <202107152049.3kftantyynji@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210715.163348.2298778826242193015.horikyota.ntt@gmail.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021-Jul-15, Kyotaro Horiguchi wrote: > > Thanks! I saw the issue here. Some investigation showd me a doubious > > motion of XLogCtl->repliationSlotMinLSN. Slot invalidation is > > forgetting to recalculate it and that misbehavior retreats the segment > > horizon. Actually, looking again, isn't this supposed to happen in KeepLogSeg()? We have a block that caps to max_slot_wal_keep_size_mb there ... why did that not work? -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "Sallah, I said NO camels! That's FIVE camels; can't you count?" (Indiana Jones)