pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
[pgvector/pgvector] PR #775: Change NOTICE to WARNING when HNSW graph does not fit in memory during build
3+ messages / 2 participants
[nested] [flat]

* [pgvector/pgvector] PR #775: Change NOTICE to WARNING when HNSW graph does not fit in memory during build
@ 2025-02-12 21:58 "michaelbautin (@michaelbautin)" <noreply+michaelbautin@github.com>
  0 siblings, 0 replies; 3+ messages in thread

From: michaelbautin (@michaelbautin) @ 2025-02-12 21:58 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

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.")));
^ permalink raw [nested|flat] 3+ messages in thread

* Re: [pgvector/pgvector] PR #775: Change NOTICE to WARNING when HNSW graph does not fit in memory during build
@ 2025-02-12 22:05 ` "ankane (@ankane)" <noreply+ankane@github.com>
  1 sibling, 0 replies; 3+ messages in thread

From: ankane (@ankane) @ 2025-02-12 22:05 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

Hi @michaelbautin, thanks for the PR, but don't see a strong reason to change this, as `NOTICE` is the default level for `client_min_messages`.

^ permalink  raw  [nested|flat] 3+ messages in thread

* Re: [pgvector/pgvector] PR #775: Change NOTICE to WARNING when HNSW graph does not fit in memory during build
@ 2025-02-12 22:05 ` "ankane (@ankane)" <noreply+ankane@github.com>
  1 sibling, 0 replies; 3+ messages in thread

From: ankane (@ankane) @ 2025-02-12 22:05 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

@ankane closed this.

^ permalink  raw  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2025-02-12 22:05 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-02-12 21:58 [pgvector/pgvector] PR #775: Change NOTICE to WARNING when HNSW graph does not fit in memory during build "michaelbautin (@michaelbautin)" <noreply+michaelbautin@github.com>
2025-02-12 22:05 ` "ankane (@ankane)" <noreply+ankane@github.com>
2025-02-12 22:05 ` "ankane (@ankane)" <noreply+ankane@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