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 1ouZak-0002iR-Cu for pgsql-bugs@arkaria.postgresql.org; Mon, 14 Nov 2022 13:33:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ouZai-00026e-0E for pgsql-bugs@arkaria.postgresql.org; Mon, 14 Nov 2022 13:33:36 +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 1ouZah-00026V-O1 for pgsql-bugs@lists.postgresql.org; Mon, 14 Nov 2022 13:33:35 +0000 Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ouZab-0006TG-RH for pgsql-bugs@postgresql.org; Mon, 14 Nov 2022 13:33:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=depesz.com; s=20170201; h=In-Reply-To:Content-Type:MIME-Version:References:Reply-To: Message-ID:Subject:Cc:To:Sender:From:Date:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=3AVGM8AwAAgmJxPRcEl4IGaGOyFs2E+f+XB8mxVJlFA=; b=IpFJCDQ9KggV6qB8R+kTaoOnrf 43cs+k6zQgbgxrp6RK0paPELaByCa0Y/ZP1iVhFpQW5vlY/oqfcuxLTrD2kJIZmqCjygLez3i4laQ MxmSkxv9JksSOjR9pvbk+s5q+FuBivpNSzrAEI3+o3PwSPR5zrsByw6vnvxJ8KZIVaV8=; Received: from depesz by depesz.com with local (Exim 4.94.2) (envelope-from ) id 1ouZaa-00812C-PM; Mon, 14 Nov 2022 14:33:28 +0100 Date: Mon, 14 Nov 2022 14:33:28 +0100 From: hubert depesz lubaczewski Sender: depesz@depesz.com To: Amit Kapila Cc: pgsql-bugs mailing list Subject: Re: WAL segments removed from primary despite the fact that logical replication slot needs it. Message-ID: Reply-To: depesz@depesz.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Nov 14, 2022 at 06:30:57PM +0530, Amit Kapila wrote: > > There is something weird happening: > What exactly weird you are seeing in this? To me, it appears as if the > system due to some reason ignores an existing slot that has > restart_lsn as 1039D/83825958. The weird part for me is that it is trying to remove wal files older than the same "x" many times. But perhaps it just means that the code that does it doesn't check if it did the same previously. Best regards, depesz