Re: pgsql: Avoid spurious deadlocks when upgrading a tuple lock
Alvaro Herrera <alvherre@2ndquadrant.com>
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Oleksii Kliukin <alexk@hintbits.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@lists.postgresql.org
Date: 2019-06-18T22:25:47Z
Lists: pgsql-hackers
On 2019-Jun-18, Oleksii Kliukin wrote: > Sorry, I was confused, as I was looking only at > https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=de87a084c0a5ac927017cd0834b33a932651cfc9 > > without taking your subsequent commit that silences compiler warnings at > https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=3da73d6839dc47f1f47ca57974bf28e5abd9b572 > into consideration. With that commit, the danger is indeed in resetting the > skip mechanism on each jump and potentially causing deadlocks. Yeah, I understand the confusion. Anyway, as bugs go, this one seems pretty benign. It would result in a unexplained deadlock, very rarely, and only for people who use a very strange locking pattern that includes (row-level) lock upgrades. I think it also requires aborted savepoints too, though I don't rule out the possibility that there might be a way to reproduce this without that. I pushed the patch again just now, with the new permutation. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
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 cited
-
Revert "Avoid spurious deadlocks when upgrading a tuple lock"
- 9d20b0ec8f2a 12.0 landed
- 28dc2c25c579 11.4 landed
- 93d4484ef80a 10.9 landed
- 03964e58efb8 9.6.14 landed
-
Silence compiler warning
- 3da73d6839dc 12.0 cited