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

Commit8caf613

Browse files
committed
In the final emptying phase of the new GiST buffering build, set the
queuedForEmptying flag correctly on buffer when adding it to the queue.Also, don't add buffer to the queue if it's there already. These wereharmless oversights; failing to set the flag just means that a buffer mightget added to the queue twice if more tuples are added to it (although thatcan't actually happen at this point because all the upper buffers havealready been emptied), and having the same buffer twice in the emptyingqueue is harmless. But better be tidy.
1 parentb0025bd commit8caf613

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -964,10 +964,14 @@ gistEmptyAllBuffers(GISTBuildState *buildstate)
964964
* Add this buffer to the emptying queue, and proceed to empty
965965
* the queue.
966966
*/
967-
MemoryContextSwitchTo(gfbb->context);
968-
gfbb->bufferEmptyingQueue=
969-
lcons(nodeBuffer,gfbb->bufferEmptyingQueue);
970-
MemoryContextSwitchTo(buildstate->tmpCtx);
967+
if (!nodeBuffer->queuedForEmptying)
968+
{
969+
MemoryContextSwitchTo(gfbb->context);
970+
nodeBuffer->queuedForEmptying= true;
971+
gfbb->bufferEmptyingQueue=
972+
lcons(nodeBuffer,gfbb->bufferEmptyingQueue);
973+
MemoryContextSwitchTo(buildstate->tmpCtx);
974+
}
971975
gistProcessEmptyingQueue(buildstate);
972976
}
973977
else

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp