From ca2be5be6e6269c438b0f0ef91dc49cdecbb020a Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Mon, 21 Aug 2023 16:00:44 -0700 Subject: [PATCH] Updated comment [skip ci] --- src/hnswinsert.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/hnswinsert.c b/src/hnswinsert.c index 05facb9..941afb1 100644 --- a/src/hnswinsert.c +++ b/src/hnswinsert.c @@ -516,8 +516,9 @@ HnswInsertTuple(Relation index, Datum *values, bool *isnull, ItemPointer heap_ti element->vec = DatumGetVector(value); /* - * Get a shared lock for the duration of the insert. Use a page lock so it - * does not interfere with buffer lock (or reads when vacuuming). + * Get a shared lock. This allows vacuum to ensure no in-flight inserts + * before repairing graph. Use a page lock so it does not interfere with + * buffer lock (or reads when vacuuming). */ LockPage(index, HNSW_UPDATE_LOCK, lockmode);