]> granicus.if.org Git - postgresql/commit
Predicate locking in GIN index
authorTeodor Sigaev <teodor@sigaev.ru>
Fri, 30 Mar 2018 11:23:17 +0000 (14:23 +0300)
committerTeodor Sigaev <teodor@sigaev.ru>
Fri, 30 Mar 2018 11:23:17 +0000 (14:23 +0300)
commit43d1ed60fdd96027f044e152176c0d45cd6bf443
treeb5efc150a6cfa4d5edbc5ecbc828850097d0201f
parent019fa576ca8298ecb7b8ded6e0c857840b57a4ae
Predicate locking in GIN index

Predicate locks are used on per page basis only if fastupdate = off, in
opposite case predicate lock on pending list will effectively lock whole index,
to reduce locking overhead, just lock a relation. Entry and posting trees are
essentially B-tree, so locks are acquired on leaf pages only.

Author: Shubham Barai with some editorization by me and Dmitry Ivanov
Review by: Alexander Korotkov, Dmitry Ivanov, Fedor Sigaev
Discussion: https://www.postgresql.org/message-id/flat/CALxAEPt5sWW+EwTaKUGFL5_XFcZ0MuGBcyJ70oqbWqr42YKR8Q@mail.gmail.com
src/backend/access/gin/ginbtree.c
src/backend/access/gin/gindatapage.c
src/backend/access/gin/ginget.c
src/backend/access/gin/gininsert.c
src/backend/access/gin/ginutil.c
src/backend/access/gin/ginvacuum.c
src/backend/storage/lmgr/README-SSI
src/include/access/gin_private.h
src/test/isolation/expected/predicate-gin.out [new file with mode: 0644]
src/test/isolation/isolation_schedule
src/test/isolation/specs/predicate-gin.spec [new file with mode: 0644]