mirror of
https://github.com/postgres/postgres.git
synced 2025-07-12 21:01:52 +03:00
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
This commit is contained in:
@ -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,
|
||||
|
Reference in New Issue
Block a user