aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
diff options
context:
space:
mode:
authorAlexander Korotkov <akorotkov@postgresql.org>2019-11-19 23:07:36 +0300
committerAlexander Korotkov <akorotkov@postgresql.org>2019-11-20 00:05:12 +0300
commit9f292798992ee8efe3281ba61db3c53ea7007b1a (patch)
tree343f94bd68c506ab916e384234b0be1f4ef7a01c /src/backend/tcop/postgres.c
parente0457665ccf8052a3ec6d6c37002b81d3b29e235 (diff)
downloadpostgresql-9f292798992ee8efe3281ba61db3c53ea7007b1a.tar.gz
postgresql-9f292798992ee8efe3281ba61db3c53ea7007b1a.zip
Fix deadlock between ginDeletePage() and ginStepRight()
When ginDeletePage() is about to delete page it locks its left sibling to revise the rightlink. So, it locks pages in right to left manner. Int he same time ginStepRight() locks pages in left to right manner, and that could cause a deadlock. This commit makes ginScanToDelete() keep exclusive lock on left siblings of currently investigated path. That elimites need to relock left sibling in ginDeletePage(). Thus, deadlock with ginStepRight() can't happen anymore. Reported-by: Chen Huajun Discussion: https://postgr.es/m/5c332bd1.87b6.16d7c17aa98.Coremail.chjischj%40163.com Author: Alexander Korotkov Reviewed-by: Peter Geoghegan Backpatch-through: 10
Diffstat (limited to 'src/backend/tcop/postgres.c')
0 files changed, 0 insertions, 0 deletions