3 ms·
It‘s years since I looked deeper into the inner workings of Oracle, but isn‘t their proposal how Oracle does deal with commit and rollback? Which makes me thin
by weinzierl 9y ago
It‘s years since I looked deeper into the inner workings of Oracle, but isn‘t their proposal how Oracle does deal with commit and rollback?
Which makes me think: Maybe the true reason Postgres does it differently isn‘t technical but legal. Could there be a patent?
- dx034 9y agoI'm pretty sure they looked at this before they started the work. There's a number of different approaches out there, all have their advantages and disadvantages. But I also found the reliance on VACUUM at Postgres more problematic than Oracle's or SQL Server's approach.
- cafard 9y agoThat is more or less how Oracle does commit and rollback: changed items create a version in a "rollback segment". Queries begun during a transaction's life will get the original version of the changed items there. One can run out of rollback space, and so cause a transaction to be aborted before it creates potential inconsistency, though I haven't seen that happen in years. I can't comment on the legal stuff. But I don't think that Oracle was the only one to manage "read committed" consistency this way.
- jcriddle4 9y agoI would think any patent would have expired by now as Oracle was founded in 1977.
- snaky 9y agoYes, but it wasn't what it is now. First version programmed in C (not assembler) was version 3 (1983). Row-level locking was introduced in version 6 (1988). Constraints, stored procedures and triggers - version 7 (1992).
- ams6110 9y agoEnterpriseDB tries to be an Oracle alternative, so not surprising they want to offer Oracle-style MVCC.
- rraval 9y agoThe article has a link to a previous blog post that expands on how Oracle does it (as well as other DB's). http://amitkapila16.blogspot.ca/2015/03/different-approaches-for-mvcc-used-in.html http://amitkapila16.blogspot.ca/2015/03/different-approaches... > Oracle maintain old versions in rollback segments (also known as 'undo log').
- macdice 9y agoAlmost every RBDMS uses undo logs to implement rollback (they physically roll back/undo the changes). It is the traditional implementation technique for a whole generation of databases -- see https://en.wikipedia.org/wiki/Algorithms_for_Recovery_and_Isolation_Exploiting_Semantics https://en.wikipedia.org/wiki/Algorithms_for_Recovery_and_Is... . AFAIK only PostresSQL and possibly also Interbase/Firebird and Rdb (though I'm not 100% sure about those) work in a different way without undo logs, preferring to leave old data in the heap, step over if as required, and eventually garbage collect it later. Ancestral POSTGRES did that because its goal was to keep all versions forever and do time travel, and VACUUM just moved them off to write-only media for archival. A subset of traditional undo-based RDBMSs can also use undo logs to implement MVCC. That's primarily because the other RDBMSs didn't choose to provide snapshot isolation: instead they made writers block readers, so readers never needed to fish old row versions out of the undo log except when actually rolling transactions back. The set of databases that can do undo-based MVCC currently includes at least Oracle, DB2 (since 9.7), MySQL (InnoDB + maybe other storage engines). Note that the original implementer of PostgreSQL's WAL (REDO) logging intended to add undo log support (possibly under the influence of the super well-known ARIES design): https://www.postgresql.org/docs/7.2/static/wal.html https://www.postgresql.org/docs/7.2/static/wal.html . Somehow it's taken another 15 years for someone to try that.