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 1ol5u9-00007T-C7 for pgsql-bugs@arkaria.postgresql.org; Wed, 19 Oct 2022 10:02:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ol5u7-0001vA-OR for pgsql-bugs@arkaria.postgresql.org; Wed, 19 Oct 2022 10:02:27 +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 1ol5u7-0001v1-EQ for pgsql-bugs@lists.postgresql.org; Wed, 19 Oct 2022 10:02:27 +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 1ol5u2-0004w9-UU for pgsql-bugs@postgresql.org; Wed, 19 Oct 2022 10:02:27 +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=3RUTcfHoklAboW6oclzT+t0OhAw/wMrFCGi7aRkjJUI=; b=RJhgsjt4wJZNEz8bx72cdTgTLW gB7sUrQLk53qU3N57F/34LS/KLbCLfayTP1dAATkCtPh0i67Y7fnw6ERtQ2rc+aM4PuagzhQ2Pxde tsGQhGeMMTISC75CG4Kao1VNvpcb0rhVjPn5a7sjiEt5IodjwMqkHzTycBu4poiTfy5M=; Received: from depesz by depesz.com with local (Exim 4.94.2) (envelope-from ) id 1ol5u0-00F7DM-Pz; Wed, 19 Oct 2022 12:02:20 +0200 Date: Wed, 19 Oct 2022 12:02:20 +0200 From: hubert depesz lubaczewski Sender: depesz@depesz.com To: Amit Kapila Cc: Kyotaro Horiguchi , pgsql-bugs@postgresql.org Subject: Re: WAL segments removed from primary despite the fact that logical replication slot needs it. Message-ID: Reply-To: depesz@depesz.com References: <20221017.155307.3782702886583901.horikyota.ntt@gmail.com> <20221019.110032.2063205133677772338.horikyota.ntt@gmail.com> 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 Wed, Oct 19, 2022 at 03:16:59PM +0530, Amit Kapila wrote: > Yeah, as requested yesterday, maybe checking if this can be reproduced > will help us to narrow down the cause. If this doesn't happen due to > an application mistake it appears that after the slot becomes inactive > during the time walsender was down, the server removes the required > files but there is nothing in the code that suggests that such a thing > can happen. > Are there any more logs on publisher/subscriber which indicate any > sort of error? This specific setup of replication was torn down, we couldn't keep it running. Can setup it once more, and with some luck it will break again. Will take a day, though. Is there anything I can do to make it more debugable, but that will not require restart of pg12? Best regards, depesz