4 ms·
I implemented multiversion concurrency control[1]. I am interested how transactions are implemented without it. You need snapshot isolation too so you cannot re
by samsquire 4y ago
I implemented multiversion concurrency control[1]. I am interested how transactions are implemented without it. You need snapshot isolation too so you cannot read dirty writes and avoid phantom reads.
PolarDb sets commit timestamp to null and asynchronously changes the commit timestamp after a commit but has a CTS ring buffer for transactions that are still active. The reading transactions has to check this to see if the transaction is part way through committing.
The getting the behaviour of all at once or not at all is an interesting problem to have.
I use a database timestamp to solve this problem which is the latest transaction to have committed.
I think postgres does something clever with minimum and maximum timestamps on each tuple.
[1]: HTTPS://GitHub.com/samsquire/multiversiom-concurrency-control