Created
November 8, 2018 09:00
-
-
Save yamaz/41477510fececf59d1cc70d4b35ec893 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Postgresqlで別プロセスでtransactionを共有する方法 | |
| -- Query A スナップショットexportしてsnapshot id取得する | |
| BEGIN; | |
| select pg_export_snapshot(); | |
| -- Query B 別セッションで参照 | |
| BEGIN TRANSACTION ISOLATION LEVEL REPEATABLE READ; | |
| SET TRANSACTION SNAPSHOT 'Aで取れたsnapshot id'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment