Commit cf23b75b authored by Teodor Sigaev's avatar Teodor Sigaev

Fix using too many LWLocks bug, reported by Craig Ringer

<craig@postnewspapers.com.au>.
It was my mistake, I missed limitation of number of held locks, now GIN doesn't
use continiuous locks, but still hold buffers pinned to prevent interference
with vacuum's deletion algorithm.

Backpatch is needed.
parent fc507eb0
This diff is collapsed.
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* *
* Copyright (c) 2006-2008, PostgreSQL Global Development Group * Copyright (c) 2006-2008, PostgreSQL Global Development Group
* *
* $PostgreSQL: pgsql/src/include/access/gin.h,v 1.17 2008/04/10 22:25:25 tgl Exp $ * $PostgreSQL: pgsql/src/include/access/gin.h,v 1.18 2008/04/22 17:52:43 teodor Exp $
*-------------------------------------------------------------------------- *--------------------------------------------------------------------------
*/ */
...@@ -356,14 +356,16 @@ typedef struct GinScanEntryData ...@@ -356,14 +356,16 @@ typedef struct GinScanEntryData
/* entry, got from extractQueryFn */ /* entry, got from extractQueryFn */
Datum entry; Datum entry;
/* current ItemPointer to heap, its offset in buffer and buffer */ /* Current page in posting tree */
ItemPointerData curItem;
OffsetNumber offset;
Buffer buffer; Buffer buffer;
/* in case of Posing list */ /* current ItemPointer to heap */
ItemPointerData curItem;
/* used for Posting list and one page in Posting tree */
ItemPointerData *list; ItemPointerData *list;
uint32 nlist; uint32 nlist;
OffsetNumber offset;
bool isFinished; bool isFinished;
bool reduceResult; bool reduceResult;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment