Fixed check

This commit is contained in:
Andrew Kane
2023-12-04 15:22:12 -08:00
parent 0e19a984fb
commit 2fef497b7e

View File

@@ -383,7 +383,7 @@ BuildCallback(Relation index, CALLBACK_ITEM_POINTER, Datum *values,
if (isnull[0])
return;
if (buildstate->memoryLeft <= 0 || list_length(buildstate->elements) == LIST_MAX_LENGTH)
if (buildstate->flushed || buildstate->memoryLeft <= 0 || list_length(buildstate->elements) == LIST_MAX_LENGTH)
{
if (!buildstate->flushed)
{