!5005 修复 hash 索引分裂后页面 checksum 校验失败问题

Merge pull request !5005 from sungwu/fix_hash_checksum
This commit is contained in:
opengauss_bot
2024-03-25 08:45:22 +00:00
committed by Gitee

View File

@ -985,7 +985,6 @@ static bool _hash_alloc_buckets(Relation rel, BlockNumber firstblock, uint32 nbl
ovflopaque->hasho_bucket = -1;
ovflopaque->hasho_flag = LH_UNUSED_PAGE;
ovflopaque->hasho_page_id = HASHO_PAGE_ID;
PageSetChecksumInplace(zerobuf, lastblock);
if (RelationNeedsWAL(rel))
log_newpage(&rel->rd_node,
@ -994,6 +993,7 @@ static bool _hash_alloc_buckets(Relation rel, BlockNumber firstblock, uint32 nbl
zerobuf,
true);
PageSetChecksumInplace(page, lastblock);
if (IsSegmentFileNode(rel->rd_node)) {
Buffer buf;
for (BlockNumber i = firstblock; i <= lastblock; i++) {