Wait for selects to complete

This commit is contained in:
Andrew Kane
2023-08-21 02:24:53 -07:00
parent bbd57dfebf
commit 90a042e5aa
3 changed files with 8 additions and 3 deletions

View File

@@ -404,6 +404,10 @@ MarkDeleted(HnswVacuumState * vacuumstate)
Relation index = vacuumstate->index;
BufferAccessStrategy bas = vacuumstate->bas;
/* Wait for selects to complete */
LockPage(index, HNSW_HEAD_BLKNO, ExclusiveLock);
UnlockPage(index, HNSW_HEAD_BLKNO, ExclusiveLock);
while (BlockNumberIsValid(blkno))
{
Buffer buf;