pgvector.git / summary / log / commit / refs
commit bbd57dfebf5040c337e4f1926b5ca8efaad186f0
Author: Andrew Kane <andrew@ankane.org>
Date: Mon Aug 21 08:02:05 2023 +0000
Moved wait [skip ci]
src/hnswvacuum.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/hnswvacuum.c b/src/hnswvacuum.c
index ee340393..43b63de5 100644
--- a/src/hnswvacuum.c
+++ b/src/hnswvacuum.c
@@ -257,10 +257,6 @@ RepairGraphEntryPoint(HnswVacuumState * vacuumstate)
* ideal.
*/
- /* Wait for inserts to complete */
- LockPage(index, HNSW_METAPAGE_BLKNO, ExclusiveLock);
- UnlockPage(index, HNSW_METAPAGE_BLKNO, ExclusiveLock);
-
if (!BlockNumberIsValid(highestPoint->blkno))
highestPoint = NULL;
@@ -319,6 +315,10 @@ RepairGraph(HnswVacuumState * vacuumstate)
RepairGraphEntryPoint(vacuumstate);
+ /* Wait for inserts to complete */
+ LockPage(index, HNSW_METAPAGE_BLKNO, ExclusiveLock);
+ UnlockPage(index, HNSW_METAPAGE_BLKNO, ExclusiveLock);
+
while (BlockNumberIsValid(blkno))
{
Buffer buf;
[parent: 40a013a62275]