3 ms·
Postgres lets you synchronize snapshots across connections so that they all see the same data (though subsequent changes are not visible to the other transactio
by laurencerowe 12y ago
Postgres lets you synchronize snapshots across connections so that they all see the same data (though subsequent changes are not visible to the other transactions unless you export another snapshot.)
http://www.postgresql.org/docs/9.4/static/functions-admin.html#FUNCTIONS-SNAPSHOT-SYNCHRONIZATION http://www.postgresql.org/docs/9.4/static/functions-admin.ht...
This lets you parallelize work across multiple processes while maintaining consistency. When the client is the limiting factor you can use this with multiprocessing. When the db server is the limiting factor you can just use threads (or async.) Postgres backend processes are essentially single threaded.