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 1ovc6z-0001m5-7w for pgsql-bugs@arkaria.postgresql.org; Thu, 17 Nov 2022 10:27:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ovc6w-0000Tq-Or for pgsql-bugs@arkaria.postgresql.org; Thu, 17 Nov 2022 10:27:10 +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 1ovc6w-0000Tg-Dz for pgsql-bugs@lists.postgresql.org; Thu, 17 Nov 2022 10:27:10 +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 1ovc6q-0008AN-RG for pgsql-bugs@postgresql.org; Thu, 17 Nov 2022 10:27:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=depesz.com; s=20170201; h=In-Reply-To:Content-Transfer-Encoding:Content-Type:MIME-Version :References:Reply-To:Message-ID:Subject:Cc:To:Sender:From:Date: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=9DXQ3OyghKn1YjZSEgtl4XCyBnIv1dUuS1fql0XTfO8=; b=H3x12MvXOa0QBEEOf2Lt6W5UFt 2flnZvGuCPp6/K1v47i2GWqzDIQg+t1WZcEPt0K/nMAE/qliD6Kq61nafuIvI1wlXL2507OSK5mIZ C3M3kRb0qvCbrDL2UzAbcF2ugyA7sTmM6cgSy7/PeBdmteE8dbDhszOcUMjpDLs/5xTI=; Received: from depesz by depesz.com with local (Exim 4.94.2) (envelope-from ) id 1ovc6j-00BWeR-El; Thu, 17 Nov 2022 11:26:57 +0100 Date: Thu, 17 Nov 2022 11:26:57 +0100 From: hubert depesz lubaczewski Sender: depesz@depesz.com To: Andres Freund Cc: Kyotaro HORIGUCHI , Amit Kapila , 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: <20221117072512.q3fayfyd5ugfwvmf@awork3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20221117072512.q3fayfyd5ugfwvmf@awork3.anarazel.de> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Nov 16, 2022 at 11:25:12PM -0800, Andres Freund wrote: > Perhaps a stupid question - are you using max_slot_wal_keep_size? And what's > your wal_segment_size? And wal_keep_size? Are we talking about pg12 side? => select name, setting from pg_settings where name ~ 'wal'; name │ setting ══════════════════════════════╪═══════════ max_wal_senders │ 50 max_wal_size │ 49152 min_wal_size │ 256 wal_block_size │ 8192 wal_buffers │ 2048 wal_compression │ on wal_consistency_checking │ wal_init_zero │ on wal_keep_segments │ 1000 wal_level │ logical wal_log_hints │ off wal_receiver_status_interval │ 10 wal_receiver_timeout │ 60000 wal_recycle │ on wal_retrieve_retry_interval │ 5000 wal_segment_size │ 16777216 wal_sender_timeout │ 60000 wal_sync_method │ fdatasync wal_writer_delay │ 200 wal_writer_flush_after │ 128 (20 rows) max_slot_wal_keep_size was added in pg13, afaik. and wel_keep_* was _segments in pg 12. Best regards, depesz