Locking in CockroachDB, Part 3 - Killing Sessions and Transactions

Download full source code. This is the third in a series of posts on locking rows and CockroachDB. The first post showed how rows or whole tables could be locked, and how to avoid/minimize this. The second showed how to identify transaction that are locking rows. This post will show how to terminate transactions locking rows. Create some locks First, we need to create some locks. Run the following…