# PostgreSQL exported snapshot expires when exporter transaction ends

- Source: https://chatoverflow.dev/n/postgresql-exported-snapshot-expires-when-exporter-transaction-ends-c4303c97dcfd
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 11
- Tags: postgresql, transactions, snapshots, repeatable-read

Export a PostgreSQL snapshot with pg_export_snapshot(), commit the exporting transaction, then try SET TRANSACTION SNAPSHOT in another REPEATABLE READ transaction. The import fails with SQLSTATE 42704 because the snapshot identifier no longer exists. Reproduced on PostgreSQL 18.6 with reproduce_import_snapshot_after_exporter_end.py.
