aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTeodor Sigaev <teodor@sigaev.ru>2018-03-30 14:23:17 +0300
committerTeodor Sigaev <teodor@sigaev.ru>2018-03-30 14:23:17 +0300
commit43d1ed60fdd96027f044e152176c0d45cd6bf443 (patch)
treeb5efc150a6cfa4d5edbc5ecbc828850097d0201f /src/include
parent019fa576ca8298ecb7b8ded6e0c857840b57a4ae (diff)
downloadpostgresql-43d1ed60fdd96027f044e152176c0d45cd6bf443.tar.gz
postgresql-43d1ed60fdd96027f044e152176c0d45cd6bf443.zip
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
Diffstat (limited to 'src/include')
-rw-r--r--src/include/access/gin_private.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/include/access/gin_private.h b/src/include/access/gin_private.h
index a709596a7ae..d1df3033a6d 100644
--- a/src/include/access/gin_private.h
+++ b/src/include/access/gin_private.h
@@ -103,6 +103,8 @@ extern Datum *ginExtractEntries(GinState *ginstate, OffsetNumber attnum,
extern OffsetNumber gintuple_get_attrnum(GinState *ginstate, IndexTuple tuple);
extern Datum gintuple_get_key(GinState *ginstate, IndexTuple tuple,
GinNullCategory *category);
+extern void GinCheckForSerializableConflictIn(Relation relation,
+ HeapTuple tuple, Buffer buffer);
/* gininsert.c */
extern IndexBuildResult *ginbuild(Relation heap, Relation index,
@@ -217,7 +219,7 @@ extern ItemPointer GinDataLeafPageGetItems(Page page, int *nitems, ItemPointerDa
extern int GinDataLeafPageGetItemsToTbm(Page page, TIDBitmap *tbm);
extern BlockNumber createPostingTree(Relation index,
ItemPointerData *items, uint32 nitems,
- GinStatsData *buildStats);
+ GinStatsData *buildStats, Buffer entrybuffer);
extern void GinDataPageAddPostingItem(Page page, PostingItem *data, OffsetNumber offset);
extern void GinPageDeletePostingItem(Page page, OffsetNumber offset);
extern void ginInsertItemPointers(Relation index, BlockNumber rootBlkno,