I wrote:
> I've now traced it to this bit in gindatapage.c:
The attached patch (against 9.4) should be sufficient to fix this problem.
Perhaps you can do some testing there while I'm doing the same.
regards, tom lane
diff --git a/src/backend/access/gin/gindatapage.c b/src/backend/access/gin/gindatapage.c
index 2090209..77725ac 100644
--- a/src/backend/access/gin/gindatapage.c
+++ b/src/backend/access/gin/gindatapage.c
@@ -86,7 +86,7 @@ typedef struct
char action;
ItemPointerData *modifieditems;
- int nmodifieditems;
+ uint16 nmodifieditems;
/*
* The following fields represent the items in this segment. If 'items' is