pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fujii Masao <masao.fujii@oss.nttdata.com>
To: kevinkbiju@gmail.com
To: pgsql-docs@lists.postgresql.org
Subject: Re: Hot standbys now support exporting snapshots while creating a logical replication slot
Date: Fri, 23 May 2025 10:42:13 +0900
Message-ID: <97694620-3bfe-457c-8761-1a08a233f57b@oss.nttdata.com> (raw)
In-Reply-To: <174791480466.798.17122832105389395178@wrigleys.postgresql.org>
References: <174791480466.798.17122832105389395178@wrigleys.postgresql.org>



On 2025/05/22 20:53, PG Doc comments form wrote:
> The following documentation comment has been logged on the website:
> 
> Page: https://www.postgresql.org/docs/17/logicaldecoding-explanation.html
> Description:
> 
> Hi,
> I'm referring to this bit at the very end of the page: 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 NOEXPORT_SNAPSHOT option.
> It's not clear what the intention of this is (is it referring only to
> physical replication slots?) but as it stands you can export snapshots while
> creating a logical replication slot. This should have been possible starting
> PG16, I've tested this on PG17.

The description "Creation of a snapshot is not always possible. In particular,
it will fail when connected to a hot standby." no longer seems accurate.
Since v10 (commit 6c2003f8a1b), exporting snapshots on a standby has been supported.

This description was accurate when the first patch [1] adding that description
was written, but I think we just overlooked updating it later.


> As an aside, I think NOEXPORT_SNAPSHOT is from the older syntax of
> CREATE_REPLICATION_SLOT and should be swapped with SNAPSHOT 'nothing'.

Yes, so how about the following change?

      <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>

Regards,

[1] https://www.postgresql.org/message-id/CAMsr+YFjxv0T8Yi1Q=3tVdgViU2bm+fb_-XUbTfxHsnLDNSkzg@mail.gmail...

Regards,

-- 
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION






view thread (5+ messages)  latest in thread

Message-ID: <97694620-3bfe-457c-8761-1a08a233f57b@oss.nttdata.com>
Permalink:  ../97694620-3bfe-457c-8761-1a08a233f57b@oss.nttdata.com/
Also on:    postgresql.org/message-id/97694620-3bfe-457c-8761-1a08a233f57b@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, kevinkbiju@gmail.com, pgsql-docs@lists.postgresql.org
  Subject: Re: Hot standbys now support exporting snapshots while creating a logical replication slot
  In-Reply-To: <97694620-3bfe-457c-8761-1a08a233f57b@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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox