4 ms·
For some reason I had it in my head that most databases don't actually block until fsync() returns- instead, the guarantee you get is that: # if execution cont
by krakensden 12y ago
For some reason I had it in my head that most databases don't actually block until fsync() returns- instead, the guarantee you get is that:
# if execution continues, everything agrees on the state of the transaction
# if execution halts, because of a crash or whatever, you'll come back online at a consistent state from the past
- gaius 12y agoTypically when you COMMIT the changes will be written to the transaction log, which is sequential, then later written asynchronously to the data files. So you get the performance of sequential writes and the flexibility of random writes, which is nice. But once something is COMMIT'd it is permanent, it will survive any crash after COMMIT returns. If it has not yet be written to the datafiles, the recovery process will do that.