pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Fujii Masao <masao.fujii@oss.nttdata.com>
Cc: Nisha Moond <nisha.moond412@gmail.com>
Cc: Gunnar Morling <gunnar.morling@googlemail.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: Unexpected behavior when setting "idle_replication_slot_timeout"
Date: Sat, 05 Jul 2025 07:35:38 +0200
Message-ID: <3422d282fd45e460b4ce1bd0745523ba63bd3848.camel@cybertec.at> (raw)
In-Reply-To: <CAA4eK1Lp+ZY2Mr3jtspF_oKDUx7241h_Ke7g5g+D-XHFA7xC+g@mail.gmail.com>
References: <CADGJaX_0+FTguWpNSpgVWYQP_7MhoO0D8=cp4XozSQgaZ40Odw@mail.gmail.com>
	<CABdArM76e8-XChodqKxEiRK3tR_Yv3cymn_AWfP4bOsLDscZAg@mail.gmail.com>
	<30e91649-06dd-453e-8658-5f4acd03a3bd@oss.nttdata.com>
	<b26f13d7-769a-4b64-8bed-cb3a833c0604@oss.nttdata.com>
	<686577f2379e4b978803e72746dcf0dd7baf3937.camel@cybertec.at>
	<CAA4eK1Lp+ZY2Mr3jtspF_oKDUx7241h_Ke7g5g+D-XHFA7xC+g@mail.gmail.com>

On Sat, 2025-07-05 at 09:52 +0530, Amit Kapila wrote:
> On Fri, Jul 4, 2025 at 9:37 PM Laurenz Albe <laurenz.albe@cybertec.at> wrote:
> > What exactly does it mean for a replication slot to idle?
> > 
> > - Does it mean that the standby is not connected?
> 
> It means the above. The slot is used for purposes other than the
> standby as well, so we can't mention something only specific to the
> standby.
> 
> > I think we could do better here.
> 
> Sure, feel free to propose what you think makes it better.

Done in the attached patch.

> We expect the value of this variable to be in hours or, in some cases,
> days. Specifying in seconds would be inconvenient for users.

I don't buy that argument.  Specifying shared_buffers in 8kB blocks
would be quite inconvenient to most users, but I don't remember any
complaints about it.  One of the nice things about the Grand Unified
Configuration is that you can use units different from the default.

On the other hand, if the behavior is clearly documented, as I have
tried to do with my patch, it should be fine.  So I'll rest my case if
you apply my patch.

Yours,
Laurenz Albe

Attachments:

  [text/x-patch] v1-0001-Improve-doc-for-idle_replication_slot_timeout.patch (1.9K, ../3422d282fd45e460b4ce1bd0745523ba63bd3848.camel@cybertec.at/2-v1-0001-Improve-doc-for-idle_replication_slot_timeout.patch)
  download | inline diff:
From e49ad0034ee55577c8e881b9ba4232031ba639e2 Mon Sep 17 00:00:00 2001
From: Laurenz Albe <laurenz.albe@cybertec.at>
Date: Sat, 5 Jul 2025 07:27:10 +0200
Subject: [PATCH v1] Improve doc for idle_replication_slot_timeout

Define what exactly is meant by "idle" here.  Also, emphasize that
the value is rounded to minutes, since that caused some surprise
during beta testing.

Author: Laurenz Albe <laurenz.albe@cybertec.at>
Discussion: https://postgr.es/m/CADGJaX_0%2BFTguWpNSpgVWYQP_7MhoO0D8%3Dcp4XozSQgaZ40Odw%40mail.gmail.com
---
 doc/src/sgml/config.sgml | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 59a0874528a..2b4f9f34cf4 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -4618,12 +4618,14 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"'  # Windows
       </term>
       <listitem>
        <para>
-        Invalidate replication slots that have remained idle longer than this
-        duration. If this value is specified without units, it is taken as
-        minutes. A value of zero (the default) disables the idle timeout
-        invalidation mechanism. This parameter can only be set in the
-        <filename>postgresql.conf</filename> file or on the server command
-        line.
+        Invalidate replication slots that have been inactive (not used by a
+        <link linkend="protocol-replication">replication connection</link>)
+        for longer than this duration. If the value is specified without
+        units, it is taken as minutes. Values specified in units smaller than
+        a minute are rounded to the nearest minute. A value of zero (the
+        default) disables the idle timeout invalidation mechanism. This
+        parameter can only be set in the <filename>postgresql.conf</filename>
+        file or on the server command line.
        </para>
 
        <para>
-- 
2.50.0



view thread (38+ messages)  latest in thread

Message-ID: <3422d282fd45e460b4ce1bd0745523ba63bd3848.camel@cybertec.at>
Permalink:  ../3422d282fd45e460b4ce1bd0745523ba63bd3848.camel@cybertec.at/
Also on:    postgresql.org/message-id/3422d282fd45e460b4ce1bd0745523ba63bd3848.camel@cybertec.at

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: laurenz.albe@cybertec.at, amit.kapila16@gmail.com, masao.fujii@oss.nttdata.com, nisha.moond412@gmail.com, gunnar.morling@googlemail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: Unexpected behavior when setting "idle_replication_slot_timeout"
  In-Reply-To: <3422d282fd45e460b4ce1bd0745523ba63bd3848.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox