pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
From: michaelbautin (@michaelbautin) <noreply+michaelbautin@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: [pgvector/pgvector] PR #775: Change NOTICE to WARNING when HNSW graph does not fit in memory during build
Date: Wed, 12 Feb 2025 21:58:41 +0000
Message-ID: <gh-pgvector-pgvector-775@github.com> (raw)

This should help prevent cases where users wait for a very long time (24+ hours) for index build because they have not configured the maintenance work memory correctly, as happened in #300 and #504.

inline patch 1: src/hnswbuild.c (+1/-1 lines) download inline-1.patchdiff --git a/src/hnswbuild.c b/src/hnswbuild.c index b667478b6..26491ab63 100644 --- a/src/hnswbuild.c +++ b/src/hnswbuild.c @@ -519,7 +519,7 @@ InsertTuple(Relation index, Datum *values, bool *isnull, ItemPointer heaptid, Hn if (!graph->flushed) { - ereport(NOTICE, + ereport(WARNING, (errmsg("hnsw graph no longer fits into maintenance_work_mem after " INT64_FORMAT " tuples", (int64) graph->indtuples), errdetail("Building will take significantly more time."), errhint("Increase maintenance_work_mem to speed up builds.")));

view thread (3+ messages)  latest in thread

Message-ID: <gh-pgvector-pgvector-775@github.com>
Permalink:  ../gh-pgvector-pgvector-775@github.com/

 ·  · 


This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox