Content-Length: 16339 | pFad | https://postgr.es/m/174791480466.798.17122832105389395178@wrigleys.postgresql.org

PostgreSQL: Hot standbys now support exporting snapshots while creating a logical replication slot

Hot standbys now support exporting snapshots while creating a logical replication slot

From: PG Doc comments form <noreply(at)postgresql(dot)org>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Cc: kevinkbiju(at)gmail(dot)com
Subject: Hot standbys now support exporting snapshots while creating a logical replication slot
Date: 2025-05-22 11:53:24
Message-ID: 174791480466.798.17122832105389395178@wrigleys.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-docs

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

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Fujii Masao 2025-05-23 01:42:13 Re: Hot standbys now support exporting snapshots while creating a logical replication slot
Previous Message Fujii Masao 2025-05-22 11:17:19 Add missing references to database object statistics manipulation functions in documentation








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://postgr.es/m/174791480466.798.17122832105389395178@wrigleys.postgresql.org

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy