What is the difference between a lock and a latch in the context of concurrent access to a database?

From CMU 15-721 (Spring 2016), lecture 6 presentation, slides 25 and 26, which cites A Survey of B-Tree Locking Techniques by Goetz Graefe:

Locks
→ Protects the index’s logical contents from other txns.
→ Held for txn duration.
→ Need to be able to rollback changes.

Latches
→ Protects the critical sections of the index’s internal data structure from other threads.
→ Held for operation duration.
→ Do not need to be able to rollback changes.

Locks and latches

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)