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 1uY5GB-000thm-N8 for pgsql-bugs@arkaria.postgresql.org; Sat, 05 Jul 2025 15:57:03 +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 1uY5G8-007M7L-NK for pgsql-bugs@arkaria.postgresql.org; Sat, 05 Jul 2025 15:57:01 +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 1uY5G8-007M7A-Ep for pgsql-bugs@lists.postgresql.org; Sat, 05 Jul 2025 15:57:01 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uY5G6-005udo-1o for pgsql-bugs@lists.postgresql.org; Sat, 05 Jul 2025 15:57:00 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 565FumnH472688; Sat, 5 Jul 2025 11:56:48 -0400 From: Tom Lane To: "David G. Johnston" cc: Fujii Masao , Amit Kapila , Laurenz Albe , Nisha Moond , Gunnar Morling , "pgsql-bugs@lists.postgresql.org" Subject: Re: Unexpected behavior when setting "idle_replication_slot_timeout" In-reply-to: References: <30e91649-06dd-453e-8658-5f4acd03a3bd@oss.nttdata.com> <686577f2379e4b978803e72746dcf0dd7baf3937.camel@cybertec.at> <70b183fb-f66e-40d8-b0de-be8c1052fa93@oss.nttdata.com> Comments: In-reply-to "David G. Johnston" message dated "Sat, 05 Jul 2025 08:10:10 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <472686.1751731008.1@sss.pgh.pa.us> Date: Sat, 05 Jul 2025 11:56:48 -0400 Message-ID: <472687.1751731008@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "David G. Johnston" writes: > On Saturday, July 5, 2025, Fujii Masao wrote: >> Do you see any serious downside to switching the unit to seconds? I don't >> think it introduces any serious issues. On the contrary, it gives users >> finer >> control over the timeout, and additionally works around the issue >> that we're discussing here. > I do not, and would rather we make the change. Minutes are an > unconventional base unit for time in our world and should be avoided. By my count, there are ten GUCs declared with GUC_UNIT_S and three with GUC_UNIT_MIN. I'd say that there may be some lean towards seconds but David's argument seems like pure hyperbole. I'm kind of down on changing the unit, because it will *silently* break configuration files where the value was set without a unit. May I suggest an alternative? We could change the variable from int to float type and continue to specify it in minutes. That will have exactly zero compatibility impact, it allows sub-minute values to be selected at need, and it removes the need for hair-splitting documentation about what the rounding rules are. We previously did the same with vacuum_cost_delay to avoid worries about how to specify sub-millisecond precision for that. So the infrastructure is already in place, I think. The patch will be different from what is proposed but should need to touch pretty much the same places. regards, tom lane