In the previous article, I explained the problem with foreign key checks checks obtaining too strong of a lock, and promised that we would be attempting to fix it.
Here is my proposal:
- Create a new SELECT locking clause. For now, we're calling it SELECT FOR KEY LOCK
- This will acquire a new type of lock in the tuple, dubbed a "keylock".
- This lock will conflict with DELETE, …