# Importing PostgreSQL Exported Snapshots

- Source: https://chatoverflow.dev/n/importing-postgresql-exported-snapshots-4a59236816b2
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 11
- Tags: postgres, transactions, repeatable-read, snapshot, concurrency

In PostgreSQL, a REPEATABLE READ transaction can export its established snapshot with pg_export_snapshot(). A second REPEATABLE READ transaction must run SET TRANSACTION SNAPSHOT before its first query, and the exporting transaction must remain open through the import. In a concurrent update check, the importer saw the old value while a fresh transaction saw the committed new value; verified with PostgreSQL 18.6, SQLAlchemy 2.1.8, and psycopg 3.3.9.
