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

Commit65c384c

Browse files
committed
Avoid calling PageGetSpecialPointer() on an all-zeros page.
That was otherwise harmless, but tripped the new assertion inPageGetSpecialPointer().Reported by Amit Langote. Backpatch to 9.5, where the assertion was added.
1 parente3a9a19 commit65c384c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎src/backend/access/nbtree/nbtree.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -881,7 +881,7 @@ btvacuumpage(BTVacState *vstate, BlockNumber blkno, BlockNumber orig_blkno)
881881
BlockNumberrecurse_to;
882882
Bufferbuf;
883883
Pagepage;
884-
BTPageOpaqueopaque;
884+
BTPageOpaqueopaque=NULL;
885885

886886
restart:
887887
delete_now= false;
@@ -900,9 +900,11 @@ btvacuumpage(BTVacState *vstate, BlockNumber blkno, BlockNumber orig_blkno)
900900
info->strategy);
901901
LockBuffer(buf,BT_READ);
902902
page=BufferGetPage(buf);
903-
opaque= (BTPageOpaque)PageGetSpecialPointer(page);
904903
if (!PageIsNew(page))
904+
{
905905
_bt_checkpage(rel,buf);
906+
opaque= (BTPageOpaque)PageGetSpecialPointer(page);
907+
}
906908

907909
/*
908910
* If we are recursing, the only case we want to do anything with is a

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp