Only show message if flushed due to memory [skip ci]

This commit is contained in:
Andrew Kane
2023-12-04 15:29:23 -08:00
parent 2fef497b7e
commit a59aa02dd9

View File

@@ -387,6 +387,7 @@ BuildCallback(Relation index, CALLBACK_ITEM_POINTER, Datum *values,
{ {
if (!buildstate->flushed) if (!buildstate->flushed)
{ {
if (buildstate->memoryLeft <= 0)
ereport(NOTICE, ereport(NOTICE,
(errmsg("hnsw graph no longer fits into maintenance_work_mem after " INT64_FORMAT " tuples", (int64) buildstate->indtuples), (errmsg("hnsw graph no longer fits into maintenance_work_mem after " INT64_FORMAT " tuples", (int64) buildstate->indtuples),
errdetail("Building will take significantly more time."), errdetail("Building will take significantly more time."),