authz: Fix Postgres row deadlock
Created by: tsenart
Fixes: https://buildkite.com/sourcegraph/sourcegraph/builds/37738#2cecaab0-11af-40c0-a36b-a619f10727e7
Merge request reports
Activity
Created by: beyang
Review context (from Slack):
beyang any worries about how now the critical zone (transaction zone) is now smaller that it was before (e.g., it does not include the `load` invocation)? [1m] tomas @beyang: It's OK, because we explicitly use "FOR SHARE" (a read lock) in the first load. [1m] beyang i guess it's okay because it preserves before-after atomicity? [1m] tomas Which blocks even outside of a tx [1m] beyang ah got it [<1m] tomas When the row has been locked with FOR UPDATE
Please register or sign in to reply