agora inbox for pgsql-docs@postgresql.org
help / color / mirror / Atom feedFrom: Fujii Masao <masao.fujii@oss.nttdata.com>
To: Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com>
Cc: pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>
Subject: Re: Mention idle_replication_slot_timeout in pg_replication_slots docs
Date: Thu, 26 Jun 2025 16:55:26 +0900
Message-ID: <8b5ca8aa-dbc0-4f58-87bf-403352f3d00c@oss.nttdata.com> (raw)
In-Reply-To: <OSCPR01MB149667D264CBA6838AEB20648F57AA@OSCPR01MB14966.jpnprd01.prod.outlook.com>
References: <78b34e84-2195-4f28-a151-5d204a382fdd@oss.nttdata.com>
<OSCPR01MB149667D264CBA6838AEB20648F57AA@OSCPR01MB14966.jpnprd01.prod.outlook.com>
On 2025/06/26 15:43, Hayato Kuroda (Fujitsu) wrote:
> Dear Fujii-san,
>
>> The pg_replication_slots documentation mentions only max_slot_wal_keep_size
>> as a condition under which the wal_status column can show unreserved or lost.
>> However, since commit ac0e33136ab, idle_replication_slot_timeout can also
>> cause this behavior when it is set. This has not been documented yet.
>> https://www.postgresql.org/docs/devel/view-pg-replication-slots.html
>
> Oh, I feel the doc should be also updated.
Thanks for the review!
>> So, how about updating the documentation to also mention
>> idle_replication_slot_timeout as a factor that can cause wal_status to
>> become unreserved or lost? Patch attached.
>
> One comment:
>
> ```
> <para>
> <literal>lost</literal> means that some required WAL files have
> been removed and this slot is no longer usable.
> </para>
> ```
>
> IIUC, there is a case that status is "lost" but the required WALs have not been
> dropped yet if the slot was invalidated due to the timeout. How about removing the
> first part:
>
> ```
> <literal>lost</literal> means that this slot is no longer usable.
> ```
Agreed. Attached is the updated version of the patch.
Regards,
--
Fujii Masao
NTT DATA Japan Corporation
From a730908764b2255fd7ab36441417bddc643d4a5e Mon Sep 17 00:00:00 2001
From: Fujii Masao <fujii@postgresql.org>
Date: Thu, 26 Jun 2025 16:49:59 +0900
Subject: [PATCH v2] doc: Mention idle_replication_slot_timeout in
pg_replication_slots docs.
The pg_replication_slots documentation previously mentioned only
max_slot_wal_keep_size as a condition under which the wal_status column
can show unreserved or lost. However, since commit ac0e33136ab,
idle_replication_slot_timeout can also cause this behavior when it is set.
This was not documented.
This commit updates the documentation to also mention
idle_replication_slot_timeout as a factor that can cause wal_status
to become unreserved or lost.
Author: Fujii Masao <masao.fujii@gmail.com>
Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Reviewed-by: Nisha Moond <nisha.moond412@gmail.com>
Discussion: https://postgr.es/m/78b34e84-2195-4f28-a151-5d204a382fdd@oss.nttdata.com
---
doc/src/sgml/system-views.sgml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/doc/src/sgml/system-views.sgml b/doc/src/sgml/system-views.sgml
index 986ae1f543d..308e5dabf3b 100644
--- a/doc/src/sgml/system-views.sgml
+++ b/doc/src/sgml/system-views.sgml
@@ -2825,15 +2825,15 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
</listitem>
<listitem>
<para>
- <literal>lost</literal> means that some required WAL files have
- been removed and this slot is no longer usable.
+ <literal>lost</literal> means that this slot is no longer usable.
</para>
</listitem>
</itemizedlist>
The last two states are seen only when
<xref linkend="guc-max-slot-wal-keep-size"/> is
- non-negative. If <structfield>restart_lsn</structfield> is NULL, this
- field is null.
+ non-negative and/or <xref linkend="guc-idle-replication-slot-timeout"/>
+ is greater than zero. If <structfield>restart_lsn</structfield> is NULL,
+ this field is null.
</para></entry>
</row>
--
2.49.0
Attachments:
[text/plain] v2-0001-doc-Mention-idle_replication_slot_timeout-in-pg_r.patch (2.0K, ../8b5ca8aa-dbc0-4f58-87bf-403352f3d00c@oss.nttdata.com/2-v2-0001-doc-Mention-idle_replication_slot_timeout-in-pg_r.patch)
download | inline diff:
From a730908764b2255fd7ab36441417bddc643d4a5e Mon Sep 17 00:00:00 2001
From: Fujii Masao <fujii@postgresql.org>
Date: Thu, 26 Jun 2025 16:49:59 +0900
Subject: [PATCH v2] doc: Mention idle_replication_slot_timeout in
pg_replication_slots docs.
The pg_replication_slots documentation previously mentioned only
max_slot_wal_keep_size as a condition under which the wal_status column
can show unreserved or lost. However, since commit ac0e33136ab,
idle_replication_slot_timeout can also cause this behavior when it is set.
This was not documented.
This commit updates the documentation to also mention
idle_replication_slot_timeout as a factor that can cause wal_status
to become unreserved or lost.
Author: Fujii Masao <masao.fujii@gmail.com>
Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Reviewed-by: Nisha Moond <nisha.moond412@gmail.com>
Discussion: https://postgr.es/m/78b34e84-2195-4f28-a151-5d204a382fdd@oss.nttdata.com
---
doc/src/sgml/system-views.sgml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/doc/src/sgml/system-views.sgml b/doc/src/sgml/system-views.sgml
index 986ae1f543d..308e5dabf3b 100644
--- a/doc/src/sgml/system-views.sgml
+++ b/doc/src/sgml/system-views.sgml
@@ -2825,15 +2825,15 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
</listitem>
<listitem>
<para>
- <literal>lost</literal> means that some required WAL files have
- been removed and this slot is no longer usable.
+ <literal>lost</literal> means that this slot is no longer usable.
</para>
</listitem>
</itemizedlist>
The last two states are seen only when
<xref linkend="guc-max-slot-wal-keep-size"/> is
- non-negative. If <structfield>restart_lsn</structfield> is NULL, this
- field is null.
+ non-negative and/or <xref linkend="guc-idle-replication-slot-timeout"/>
+ is greater than zero. If <structfield>restart_lsn</structfield> is NULL,
+ this field is null.
</para></entry>
</row>
--
2.49.0
view thread (13+ messages) latest in thread
Message-ID: <8b5ca8aa-dbc0-4f58-87bf-403352f3d00c@oss.nttdata.com>
Permalink: ../8b5ca8aa-dbc0-4f58-87bf-403352f3d00c@oss.nttdata.com/
Also on: postgresql.org/message-id/8b5ca8aa-dbc0-4f58-87bf-403352f3d00c@oss.nttdata.com
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-docs@postgresql.org
Cc: masao.fujii@oss.nttdata.com, kuroda.hayato@fujitsu.com, pgsql-docs@lists.postgresql.org
Subject: Re: Mention idle_replication_slot_timeout in pg_replication_slots docs
In-Reply-To: <8b5ca8aa-dbc0-4f58-87bf-403352f3d00c@oss.nttdata.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox