mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-21 08:29:39 +08:00
Reset unused fields in GIN data leaf page footer.
The maxoff field is not used in the new, compressed page format. Let's reset it when converting an old-format page to the new format. The code won't care either way, but this makes it possible to use the field for something else in the future.
This commit is contained in:
parent
a8f374849f
commit
d150ff5781
@ -817,7 +817,10 @@ dataPlaceToPageLeafRecompress(Buffer buf, disassembledLeaf *leaf,
|
||||
}
|
||||
Assert(newsize <= GinDataLeafMaxContentSize);
|
||||
GinDataLeafPageSetPostingListSize(page, newsize);
|
||||
GinPageSetCompressed(page); /* in case it was in pre-9.4 format before */
|
||||
|
||||
/* Reset these in case the page was in pre-9.4 format before */
|
||||
GinPageSetCompressed(page);
|
||||
GinPageGetOpaque(page)->maxoff = InvalidOffsetNumber;
|
||||
|
||||
/* Put WAL data */
|
||||
recompress_xlog.length = (uint16) newsize;
|
||||
|
@ -153,6 +153,7 @@ ginRedoRecompress(Page page, ginxlogRecompressDataLeaf *data)
|
||||
memcpy(segment, data->newdata, data->length - data->unmodifiedsize);
|
||||
GinDataLeafPageSetPostingListSize(page, data->length);
|
||||
GinPageSetCompressed(page);
|
||||
GinPageGetOpaque(page)->maxoff = InvalidOffsetNumber;
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user