agora inbox for pgsql-docs@postgresql.org
help / color / mirror / Atom feedFrom: PG Doc comments form <noreply@postgresql.org>
To: pgsql-docs@lists.postgresql.org
Cc: kevinkbiju@gmail.com
Subject: Hot standbys now support exporting snapshots while creating a logical replication slot
Date: Thu, 22 May 2025 11:53:24 +0000
Message-ID: <174791480466.798.17122832105389395178@wrigleys.postgresql.org> (raw)
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.
postgres=# CREATE_REPLICATION_SLOT export LOGICAL pgoutput (SNAPSHOT
'export');
-[ RECORD 1 ]----+--------------------
slot_name | export
consistent_point | 0/36C9F28
snapshot_name | 00000072-0000000A-1
output_plugin | pgoutput
postgres=# SELECT pg_is_in_recovery();
-[ RECORD 1 ]-----+--
pg_is_in_recovery | t
postgres=# SHOW hot_standby;
-[ RECORD 1 ]---
hot_standby | on
As an aside, I think NOEXPORT_SNAPSHOT is from the older syntax of
CREATE_REPLICATION_SLOT and should be swapped with SNAPSHOT 'nothing'.
Thanks,
Kevin
view thread (5+ messages) latest in thread
Message-ID: <174791480466.798.17122832105389395178@wrigleys.postgresql.org>
Permalink: ../174791480466.798.17122832105389395178@wrigleys.postgresql.org/
Also on: postgresql.org/message-id/174791480466.798.17122832105389395178@wrigleys.postgresql.org
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: noreply@postgresql.org, pgsql-docs@lists.postgresql.org, kevinkbiju@gmail.com
Subject: Re: Hot standbys now support exporting snapshots while creating a logical replication slot
In-Reply-To: <174791480466.798.17122832105389395178@wrigleys.postgresql.org>
* 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