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

Commit2502f45

Browse files
committed
When a GiST page is split during index build, it might not have a buffer.
Previously it was thought that it's impossible as the code stands, becauseinsertions create buffers as tuples are cascaded downwards, and indexsplit also creaters buffers eagerly for all halves. But the example fromJay Levitt demonstrates that it can happen, when the root page is split.It's in fact OK if the buffer doesn't exist, so we just need to remove thesanity check. In fact, we've been discussing the possibility of destroyingempty buffers to conserve memory, which would render the sanity checkcompletely useless anyway.Fix by Alexander Korotkov
1 parentbc8765e commit2502f45

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

‎src/backend/access/gist/gistbuildbuffers.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -606,12 +606,8 @@ gistRelocateBuildBuffersOnSplit(GISTBuildBuffers *gfbb, GISTSTATE *giststate,
606606
HASH_FIND,&found);
607607
if (!found)
608608
{
609-
/*
610-
* Node buffer should exist at this point. If it didn't exist before,
611-
* the insertion that caused the page to split should've created it.
612-
*/
613-
elog(ERROR,"node buffer of page being split (%u) does not exist",
614-
blocknum);
609+
/* The page has no buffer, so we have nothing to do. */
610+
return;
615611
}
616612

617613
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp