mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-12 23:56:55 +08:00
Added version to reduce stale reads and writes and prepare for optimistic locking
This commit is contained in:
@@ -85,6 +85,7 @@ typedef struct HnswNeighborArray HnswNeighborArray;
|
||||
typedef struct HnswElementData
|
||||
{
|
||||
List *heaptids;
|
||||
uint8 version;
|
||||
uint8 level;
|
||||
uint8 deleted;
|
||||
HnswNeighborArray *neighbors;
|
||||
@@ -185,9 +186,9 @@ typedef HnswPageOpaqueData * HnswPageOpaque;
|
||||
typedef struct HnswElementTupleData
|
||||
{
|
||||
uint8 type;
|
||||
uint8 version;
|
||||
uint8 level;
|
||||
uint8 deleted;
|
||||
uint8 unused;
|
||||
ItemPointerData heaptids[HNSW_HEAPTIDS];
|
||||
ItemPointerData neighbortid;
|
||||
uint16 unused2;
|
||||
@@ -199,7 +200,7 @@ typedef HnswElementTupleData * HnswElementTuple;
|
||||
typedef struct HnswNeighborTupleData
|
||||
{
|
||||
uint8 type;
|
||||
uint8 unused;
|
||||
uint8 version;
|
||||
uint16 count;
|
||||
ItemPointerData indextids[FLEXIBLE_ARRAY_MEMBER];
|
||||
} HnswNeighborTupleData;
|
||||
|
||||
Reference in New Issue
Block a user