mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-13 16:16:56 +08:00
Avoid base address for relptr for Postgres < 14.5
This commit is contained in:
@@ -977,6 +977,14 @@ HnswBeginParallel(HnswBuildState * buildstate, bool isconcurrent, int request)
|
|||||||
/* Report less than allocated so never fails */
|
/* Report less than allocated so never fails */
|
||||||
InitGraph(&hnswshared->graphData, hnswarea, esthnswarea - 1024 * 1024);
|
InitGraph(&hnswshared->graphData, hnswarea, esthnswarea - 1024 * 1024);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Avoid base address for relptr for Postgres < 14.5
|
||||||
|
* https://github.com/postgres/postgres/commit/7201cd18627afc64850537806da7f22150d1a83b
|
||||||
|
*/
|
||||||
|
#if PG_VERSION_NUM < 140005
|
||||||
|
hnswshared->graphData.memoryUsed += MAXALIGN(1);
|
||||||
|
#endif
|
||||||
|
|
||||||
shm_toc_insert(pcxt->toc, PARALLEL_KEY_HNSW_SHARED, hnswshared);
|
shm_toc_insert(pcxt->toc, PARALLEL_KEY_HNSW_SHARED, hnswshared);
|
||||||
shm_toc_insert(pcxt->toc, PARALLEL_KEY_HNSW_AREA, hnswarea);
|
shm_toc_insert(pcxt->toc, PARALLEL_KEY_HNSW_AREA, hnswarea);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user