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

Commit371668a

Browse files
committed
Fix GiST buffering build to work when there are included columns.
gistRelocateBuildBuffersOnSplit did not get the memo about whichattribute count to use. This could lead to a crash if there wereincluded columns and buffering build was chosen. (Because thereare random page-split decisions elsewhere in GiST index build,the crashes are not entirely deterministic.)Back-patch to v12 where GiST gained support for included columns.Pavel BorisovDiscussion:https://postgr.es/m/CALT9ZEECCV5m7wvxg46PC-7x-EybUmnpupBGhSFMoAAay+r6HQ@mail.gmail.com
1 parent78c0b6e commit371668a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ gistRelocateBuildBuffersOnSplit(GISTBuildBuffers *gfbb, GISTSTATE *giststate,
666666
zero_penalty= true;
667667

668668
/* Loop over index attributes. */
669-
for (j=0;j<r->rd_att->natts;j++)
669+
for (j=0;j<IndexRelationGetNumberOfKeyAttributes(r);j++)
670670
{
671671
floatusize;
672672

@@ -692,7 +692,7 @@ gistRelocateBuildBuffersOnSplit(GISTBuildBuffers *gfbb, GISTSTATE *giststate,
692692
which=i;
693693
best_penalty[j]=usize;
694694

695-
if (j<r->rd_att->natts-1)
695+
if (j<IndexRelationGetNumberOfKeyAttributes(r)-1)
696696
best_penalty[j+1]=-1;
697697
}
698698
elseif (best_penalty[j]==usize)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp