Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8c6546f

Browse files
committed
fix counting of RumKey size during insertion into page
1 parent09d04c3 commit8c6546f

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

‎rum.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*-------------------------------------------------------------------------
22
*
3-
*bloom.h
3+
*rum.h
44
* Exported definitions for RUM index.
55
*
66
* Portions Copyright (c) 2015-2016, Postgres Professional

‎rumdatapage.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -916,17 +916,25 @@ dataPlaceToPage(RumBtree btree, Page page, OffsetNumber off)
916916
}
917917
else/* if (cmp > 0) */
918918
{
919-
intnewItemSize;
919+
intnewItemSize,
920+
aligmentSize=ptr- (char*)MAXALIGN_DOWN(ptr);
921+
#ifdefUSE_ASSERT_CHECKING
922+
char*oldptr=ptr;
923+
#endif
920924

921925
newItemSize=rumCheckPlaceToDataPageLeaf(btree->entryAttnum,
922926
btree->items+btree->curitem,&iptr,
923-
btree->rumstate,0);
927+
btree->rumstate,aligmentSize);
928+
929+
newItemSize-=aligmentSize;
924930

925931
if (newItemSize <=freespace)
926932
{
927933
ptr=rumPlaceToDataPageLeaf(ptr,btree->entryAttnum,
928934
btree->items+btree->curitem,
929935
&iptr,btree->rumstate);
936+
937+
Assert(ptr-oldptr==newItemSize);
930938
iptr=btree->items[btree->curitem].iptr;
931939
btree->curitem++;
932940
freespace-=newItemSize;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp