▲ | immibis 7 months ago | ||||||||||||||||
So why does it need to be copied into the WAL log until vacuum runs? And vacuum is not expected or required to be atomic, since it deletes data that was necessarily unreferenced anyway, so it also shouldn't need to copy the old data into WAL files. | |||||||||||||||||
▲ | mattashii 7 months ago | parent [-] | ||||||||||||||||
Many DBMSs with index-oriented storage (MySQL, Oracle, MSSQL) use undo logging for a transaction's MVCC, so that for deletion the old version is put into the undo log of that transaction and referred to as an old version of the record (or page, or ...), immediately cleaning up space on the page for new data while the transaction is still goin on. This is great for short transactions and record updates, as a page only has to hold one tuple version at a time, but that is at the cost of having to write the tuples that are being removed into a log, just in case the transaction needs to roll back. | |||||||||||||||||
|