On 2025/05/23 19:52, Kevin K Biju wrote:
Hi Fuiji,

I wasn't aware that support for exporting snapshots goes as far back as v10. 
The change looks good.

Thanks for the review!

I've prepared two patches: one for v15 and later, and another for v13 and v14.
Unless there are any objections, I'll go ahead and commit and back-patch the 
patch
to all supported branches.

Regards,

--
Fujii Masao
NTT DATA Japan Corporation
From 97f85a60cef32a12a1232d3d5e161718728d872f Mon Sep 17 00:00:00 2001
From: Fujii Masao <fu...@postgresql.org>
Date: Fri, 23 May 2025 10:18:04 +0900
Subject: [PATCH v1] doc: Fix documenation for snapshot export in logical
 decoding.

The documentation for exported snapshots in logical decoding previously
stated that snapshot creation may fail on a hot standby. This is no longer
accurate, as snapshot exporting on standbys has been supported since
PostgreSQL 10. This commit removes the outdated description.

Additionally, the docs referred to the NOEXPORT_SNAPSHOT option to
suppress snapshot exporting in CREATE_REPLICATION_SLOT. However,
since PostgreSQL 15, NOEXPORT_SNAPSHOT is considered legacy syntax
and retained only for backward compatibility. This commit updates
the documentation for v15 and later to use the modern equivalent:
SNAPSHOT 'nothing'. The older syntax is preserved in documentation for
v14 and earlier.

Back-patched to all supported branches.

Reported-by: Kevin K Biju <kevinkb...@gmail.com>
Author: Fujii Masao <masao.fu...@gmail.com>
Reviewed-by: Kevin K Biju <kevinkb...@gmail.com>
Discussion: 
https://postgr.es/m/174791480466.798.17122832105389395...@wrigleys.postgresql.org
Backpatch-through: 13
---
 doc/src/sgml/logicaldecoding.sgml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/doc/src/sgml/logicaldecoding.sgml 
b/doc/src/sgml/logicaldecoding.sgml
index 7805dd44a18..847d7de723a 100644
--- a/doc/src/sgml/logicaldecoding.sgml
+++ b/doc/src/sgml/logicaldecoding.sgml
@@ -335,8 +335,7 @@ postgres=# select * from 
pg_logical_slot_get_changes('regression_slot', NULL, NU
      using the slot's contents without losing any changes.
     </para>
     <para>
-     Creation of a snapshot is not always possible.  In particular, it will
-     fail when connected to a hot standby.  Applications that do not require
+     Applications that do not require
      snapshot export may suppress it with the 
<literal>NOEXPORT_SNAPSHOT</literal>
      option.
     </para>
-- 
2.49.0

From ecd5e21a4362dd097a28d26d5ef0f5e9a78ab968 Mon Sep 17 00:00:00 2001
From: Fujii Masao <fu...@postgresql.org>
Date: Fri, 23 May 2025 10:18:04 +0900
Subject: [PATCH v1] doc: Fix documenation for snapshot export in logical
 decoding.

The documentation for exported snapshots in logical decoding previously
stated that snapshot creation may fail on a hot standby. This is no longer
accurate, as snapshot exporting on standbys has been supported since
PostgreSQL 10. This commit removes the outdated description.

Additionally, the docs referred to the NOEXPORT_SNAPSHOT option to
suppress snapshot exporting in CREATE_REPLICATION_SLOT. However,
since PostgreSQL 15, NOEXPORT_SNAPSHOT is considered legacy syntax
and retained only for backward compatibility. This commit updates
the documentation for v15 and later to use the modern equivalent:
SNAPSHOT 'nothing'. The older syntax is preserved in documentation for
v14 and earlier.

Back-patched to all supported branches.

Reported-by: Kevin K Biju <kevinkb...@gmail.com>
Author: Fujii Masao <masao.fu...@gmail.com>
Reviewed-by: Kevin K Biju <kevinkb...@gmail.com>
Discussion: 
https://postgr.es/m/174791480466.798.17122832105389395...@wrigleys.postgresql.org
Backpatch-through: 13
---
 doc/src/sgml/logicaldecoding.sgml | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/doc/src/sgml/logicaldecoding.sgml 
b/doc/src/sgml/logicaldecoding.sgml
index 3f2bcd45a1e..dd9e83b08ea 100644
--- a/doc/src/sgml/logicaldecoding.sgml
+++ b/doc/src/sgml/logicaldecoding.sgml
@@ -455,9 +455,8 @@ postgres=# select * from 
pg_logical_slot_get_changes('regression_slot', NULL, NU
      using the slot's contents without losing any changes.
     </para>
     <para>
-     Creation of a snapshot is not always possible.  In particular, it will
-     fail when connected to a hot standby.  Applications that do not require
-     snapshot export may suppress it with the 
<literal>NOEXPORT_SNAPSHOT</literal>
+     Applications that do not require
+     snapshot export may suppress it with the <literal>SNAPSHOT 
'nothing'</literal>
      option.
     </para>
    </sect2>
-- 
2.49.0

Reply via email to