pgvector.git / summary / log / commit / refs
commit a59aa02dd93c989eea83759dffdf063bfef288d2
Author: Andrew Kane <andrew@ankane.org>
Date: Mon Dec 04 23:29:23 2023 +0000
Only show message if flushed due to memory [skip ci]
src/hnswbuild.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/hnswbuild.c b/src/hnswbuild.c
index 36b44bfa..0e7f4d96 100644
--- a/src/hnswbuild.c
+++ b/src/hnswbuild.c
@@ -387,10 +387,11 @@ BuildCallback(Relation index, CALLBACK_ITEM_POINTER, Datum *values,
{
if (!buildstate->flushed)
{
- ereport(NOTICE,
- (errmsg("hnsw graph no longer fits into maintenance_work_mem after " INT64_FORMAT " tuples", (int64) buildstate->indtuples),
- errdetail("Building will take significantly more time."),
- errhint("Increase maintenance_work_mem to speed up builds.")));
+ if (buildstate->memoryLeft <= 0)
+ ereport(NOTICE,
+ (errmsg("hnsw graph no longer fits into maintenance_work_mem after " INT64_FORMAT " tuples", (int64) buildstate->indtuples),
+ errdetail("Building will take significantly more time."),
+ errhint("Increase maintenance_work_mem to speed up builds.")));
FlushPages(buildstate);
}
[parent: 2fef497b7e8f]