Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rp8uE-005Hax-Pq for pgsql-hackers@arkaria.postgresql.org; Tue, 26 Mar 2024 15:40:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rp8uD-00HNow-T4 for pgsql-hackers@arkaria.postgresql.org; Tue, 26 Mar 2024 15:40:05 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rp8uD-00HNoX-Hk for pgsql-hackers@lists.postgresql.org; Tue, 26 Mar 2024 15:40:05 +0000 Received: from wfout4-smtp.messagingengine.com ([64.147.123.147]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rp8uA-006bZt-Ed; Tue, 26 Mar 2024 15:40:04 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfout.west.internal (Postfix) with ESMTP id 3EE6C1C00091; Tue, 26 Mar 2024 11:39:59 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Tue, 26 Mar 2024 11:39:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1711467598; x= 1711553998; bh=Zhoc6ckguGtrGSa6JlOzBNfmP1U1noRWSubsCrnj0tg=; b=q WbLk4Jrtx8eD+YiR9/bVIqexwJbXmcki7KefkrYRZ4i3yuyEM0KdDm5DnDJ15XN1 aUXooZauO3NHqj2MWRqlOD/pES1zHBxXvBTBD1PMGKO0TsGblM74dkKOho8WQmwU vbNCOZlsN8E1eL1ZlYTnxzD/bmXFNXLX8B7K8VSFxZ5MovTSTVUCEhpJxL5sC2Zb wSCL8+B+/YJNTuVLxRkv8MxqXpcLYXaH07ZJlvY2hndxPuaET433gKyXDnA1Pd8M Fkr26mVdcvNlMR6KmSQQRokT43NxKqRThLe5VmnZIiFZCPge/1ZTRhbZmK/fGQX6 lU02HDdYorm10pYBP9pXg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledruddufedgjeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepvdektdffudfftdffffehfffhjeejhffgieeuueekjeek fffgudffhfduffffueevnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhv hhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 26 Mar 2024 11:39:58 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1711467595; bh=pWG4E39NzLOK7o7AdXOvF3ri8RpumV1kF+o3hDLAjuA=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=LbO1MjSczLcl2s7z23ztuVJhEqAXtng7A8qh/zL3RpWPmxwst6nVcc2mRbCrz76hE jw0GobJg1P5uv8AJdzwurgjUkx7J54Lya5A2kMTxwUswTdy2/2gEN+SV/XEOoWjudp Pullj74GV65pfuy5Q1kzA77iSOdiMExxXapi3yJ7WfKOy7MN+ZvB5agbX5BqUyevUs LkHWBoliFgY48oD5juzYLtLgGlFMM+i0w4JZUqHAbuVqj/uYRRhgQu+aLzTV2kepfX 7+Y2Pg/J76NCT9rAqDky2oz2FM6TNQpcicWtfLOc+TPmt6MkoEpWgl9ka8bVMOGjzk YaLxheWWH5ebA== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id 8FC2E153; Tue, 26 Mar 2024 16:39:55 +0100 (CET) Date: Tue, 26 Mar 2024 16:39:55 +0100 From: Alvaro Herrera To: Nathan Bossart Cc: Amit Kapila , Robert Haas , Bertrand Drouvot , shveta malik , Bharath Rupireddy , Amit Kapila , "pgsql-hackers@postgresql.org" Subject: Re: pgsql: Track last_inactive_time in pg_replication_slots. Message-ID: <202403261539.xcjfle7sksz7@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240326150918.GB3181099@nathanxps13> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2024-Mar-26, Nathan Bossart wrote: > FWIW I'd really prefer to have something like max_slot_xid_age for this. A > time-based parameter would likely help with most cases, but transaction ID > usage will vary widely from server to server, so it'd be nice to have > something to protect against wraparound more directly. Yeah, I tend to agree that an XID-based limit makes more sense than a time-based one. > I don't object to a > time-based setting as well, but that won't always work as well for this > particular use-case, especially if we are relying on users to set a > slot-level parameter. I think slot-level parameters are mostly useless, because it takes just one slot where you forget to set it for disaster to strike. -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/