mirror of
https://github.com/pgvector/pgvector.git
synced 2026-12-04 00:08:30 +00:00
Fixed insert page logic for IVFFlat vacuuming - resolves #1078
Co-authored-by: Song Bian <29000790+Waterpine@users.noreply.github.com>
This commit is contained in:
1 parent
2d9b0b6b4f
commit
255bbf74b8
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -260,7 +260,7 @@ IvfflatUpdateList(Relation index, ListInfo listInfo,
|
||||
{
|
||||
/* Skip update if insert page is lower than original insert page */
|
||||
/* This is needed to prevent insert from overwriting vacuum */
|
||||
if (!BlockNumberIsValid(originalInsertPage) || insertPage >= originalInsertPage)
|
||||
if (!BlockNumberIsValid(originalInsertPage) || list->insertPage >= originalInsertPage)
|
||||
{
|
||||
list->insertPage = insertPage;
|
||||
changed = true;
|
||||
|
||||
+1
-1
@@ -143,7 +143,7 @@ ivfflatbulkdelete(IndexVacuumInfo *info, IndexBulkDeleteResult *stats,
|
||||
|
||||
/* Set to first free page */
|
||||
/* Must be set before searchPage is updated */
|
||||
if (!BlockNumberIsValid(insertPage) && ndeletable > 0)
|
||||
if (!BlockNumberIsValid(insertPage) && (ndeletable > 0 || maxoffno < FirstOffsetNumber || PageGetFreeSpace(page) >= ItemIdGetLength(PageGetItemId(page, FirstOffsetNumber))))
|
||||
insertPage = searchPage;
|
||||
|
||||
searchPage = IvfflatPageGetOpaque(page)->nextblkno;
|
||||
|
||||
Reference in new issue
Block a user