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

Commitd150ff5

Browse files
committed
Reset unused fields in GIN data leaf page footer.
The maxoff field is not used in the new, compressed page format. Let'sreset it when converting an old-format page to the new format. The codewon't care either way, but this makes it possible to use the field forsomething else in the future.
1 parenta8f3748 commitd150ff5

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

‎src/backend/access/gin/gindatapage.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,10 @@ dataPlaceToPageLeafRecompress(Buffer buf, disassembledLeaf *leaf,
817817
}
818818
Assert(newsize <=GinDataLeafMaxContentSize);
819819
GinDataLeafPageSetPostingListSize(page,newsize);
820-
GinPageSetCompressed(page);/* in case it was in pre-9.4 format before */
820+
821+
/* Reset these in case the page was in pre-9.4 format before */
822+
GinPageSetCompressed(page);
823+
GinPageGetOpaque(page)->maxoff=InvalidOffsetNumber;
821824

822825
/* Put WAL data */
823826
recompress_xlog.length= (uint16)newsize;

‎src/backend/access/gin/ginxlog.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ ginRedoRecompress(Page page, ginxlogRecompressDataLeaf *data)
153153
memcpy(segment,data->newdata,data->length-data->unmodifiedsize);
154154
GinDataLeafPageSetPostingListSize(page,data->length);
155155
GinPageSetCompressed(page);
156+
GinPageGetOpaque(page)->maxoff=InvalidOffsetNumber;
156157
}
157158

158159
staticvoid

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp