From: Heikki Linnakangas Date: Fri, 24 Jan 2014 09:10:09 +0000 (+0200) Subject: Fix off-by-one in newly-introdcued GIN assertion. X-Git-Tag: REL9_4_BETA1~628 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a8f374849fe2e2fcd62bbba8be85ccf030c31683;p=thirdparty%2Fpostgresql.git Fix off-by-one in newly-introdcued GIN assertion. Spotted by Alexander Korotkov --- diff --git a/src/backend/access/gin/gindatapage.c b/src/backend/access/gin/gindatapage.c index ebdacd40c55..d65979b0e46 100644 --- a/src/backend/access/gin/gindatapage.c +++ b/src/backend/access/gin/gindatapage.c @@ -815,7 +815,7 @@ dataPlaceToPageLeafRecompress(Buffer buf, disassembledLeaf *leaf, ptr += segsize; newsize += segsize; } - Assert(newsize < GinDataLeafMaxContentSize); + Assert(newsize <= GinDataLeafMaxContentSize); GinDataLeafPageSetPostingListSize(page, newsize); GinPageSetCompressed(page); /* in case it was in pre-9.4 format before */