Re: upgrades in row-level locks can deadlock
Oleksii Kliukin <alexk@hintbits.com>
From: Oleksii Kliukin <alexk@hintbits.com>
To: Álvaro Herrera <alvherre@2ndquadrant.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2019-06-14T07:52:18Z
Lists: pgsql-hackers
Alvaro Herrera <alvherre@2ndquadrant.com> wrote: > On 2019-Jun-13, Alvaro Herrera wrote: > >> On 2019-Jun-13, Oleksii Kliukin wrote: >> >>> Makes sense. For the symmetry I have included those that perform lock >>> upgrades in one session and those that doesn’t, while the other sessions >>> acquire locks, do updates or deletes. For those that don’t upgrade locks the >>> test checks that the locks are acquired in the correct order. >> >> Thanks for the updated patch! I'm about to push to branches 9.6-master. >> It applies semi-cleanly (only pgindent-maturity whitespace conflicts). > > Done, thanks for the report and patch! > > I tried hard to find a scenario that this patch breaks, but couldn't > find anything. Thank you very much for reviewing and committing it! Cheers, Oleksii
Commits
-
Avoid spurious deadlocks when upgrading a tuple lock
- 8b21b416ed62 12.0 landed
- 5246d3e79103 11.5 landed
- 0ba35c7c9f8e 9.6.15 landed
- 0772d8a00eb8 10.10 landed
- de87a084c0a5 12.0 landed
- cb2398d8069e 9.6.14 landed
- 85600b7b5da4 11.4 landed
- 14a91a8fc279 10.9 landed