1
0
mirror of https://github.com/pgvector/pgvector.git synced 2026-10-23 10:48:54 +03:00

Switched to ExtendBufferedRel [skip ci]

This commit is contained in:
Andrew Kane
2026-10-21 16:34:18 -07:00
parent 58db2b0325
commit 817e5f6fba
2 changed files with 8 additions and 0 deletions

View File

@@ -182,10 +182,14 @@ HnswCheckNorm(HnswSupport * support, Datum value)
Buffer
HnswNewBuffer(Relation index, ForkNumber forkNum)
{
#if PG_VERSION_NUM >= 160000
return ExtendBufferedRel(BMR_REL(index), forkNum, NULL, EB_LOCK_FIRST | EB_SKIP_EXTENSION_LOCK);
#else
Buffer buf = ReadBufferExtended(index, forkNum, P_NEW, RBM_NORMAL, NULL);
LockBuffer(buf, BUFFER_LOCK_EXCLUSIVE);
return buf;
#endif
}
/*

View File

@@ -139,10 +139,14 @@ IvfflatCheckMemoryUsage(Size totalSize)
Buffer
IvfflatNewBuffer(Relation index, ForkNumber forkNum)
{
#if PG_VERSION_NUM >= 160000
return ExtendBufferedRel(BMR_REL(index), forkNum, NULL, EB_LOCK_FIRST | EB_SKIP_EXTENSION_LOCK);
#else
Buffer buf = ReadBufferExtended(index, forkNum, P_NEW, RBM_NORMAL, NULL);
LockBuffer(buf, BUFFER_LOCK_EXCLUSIVE);
return buf;
#endif
}
/*