summaryrefslogtreecommitdiff
path: root/src/include/access/spgist_private.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2013-06-14 14:26:50 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2013-06-14 14:26:50 -0400
commitcbabf50dccc29aed456a56ae8909d4d593c3ab38 (patch)
tree3e8d1816d2af7de2f1b2092bdda9bdad19f9526b /src/include/access/spgist_private.h
parent7e0b9ed6c52bc19221c401859a2cfc3c8b07b43f (diff)
Avoid deadlocks during insertion into SP-GiST indexes.
SP-GiST's original scheme for avoiding deadlocks during concurrent index insertions doesn't work, as per report from Hailong Li, and there isn't any evident way to make it work completely. We could possibly lock individual inner tuples instead of their whole pages, but preliminary experimentation suggests that the performance penalty would be huge. Instead, if we fail to get a buffer lock while descending the tree, just restart the tree descent altogether. We keep the old tuple positioning rules, though, in hopes of reducing the number of cases where this can happen. Teodor Sigaev, somewhat edited by Tom Lane
Diffstat (limited to 'src/include/access/spgist_private.h')
-rw-r--r--src/include/access/spgist_private.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/access/spgist_private.h b/src/include/access/spgist_private.h
index b5bc45121aa..5ab982cdedd 100644
--- a/src/include/access/spgist_private.h
+++ b/src/include/access/spgist_private.h
@@ -651,7 +651,7 @@ extern void spgPageIndexMultiDelete(SpGistState *state, Page page,
OffsetNumber *itemnos, int nitems,
int firststate, int reststate,
BlockNumber blkno, OffsetNumber offnum);
-extern void spgdoinsert(Relation index, SpGistState *state,
+extern bool spgdoinsert(Relation index, SpGistState *state,
ItemPointer heapPtr, Datum datum, bool isnull);
#endif /* SPGIST_PRIVATE_H */