From ef480ff0b995af1f459a202294f6047b177b79bd Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Sun, 13 Aug 2023 17:22:25 -0700 Subject: [PATCH] Added comment [skip ci] --- src/hnswinsert.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/hnswinsert.c b/src/hnswinsert.c index b397941..e20a041 100644 --- a/src/hnswinsert.c +++ b/src/hnswinsert.c @@ -311,6 +311,13 @@ UpdateNeighborPages(Relation index, FmgrInfo *procinfo, Oid collation, HnswEleme /* Do not lock yet since selecting neighbors can take time */ HnswLoadNeighbors(hc->element, index); + /* + * Could improve performance for vacuuming by checking neighbors + * against list of elements being deleted. It's important to + * exclude already deleted elements for this since they can be + * replaced at any time. + */ + /* Select neighbors */ HnswUpdateConnection(e, hc, lm, lc, &idx, index, procinfo, collation);