mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-14 08:36:54 +08:00
Updated style to be consistent with latest Postgres [skip ci]
This commit is contained in:
@@ -719,7 +719,7 @@ InitBuildState(HnswBuildState * buildstate, Relation heap, Relation index, Index
|
|||||||
/* Get support functions */
|
/* Get support functions */
|
||||||
HnswInitSupport(&buildstate->support, index);
|
HnswInitSupport(&buildstate->support, index);
|
||||||
|
|
||||||
InitGraph(&buildstate->graphData, NULL, (Size) maintenance_work_mem * 1024L);
|
InitGraph(&buildstate->graphData, NULL, maintenance_work_mem * (Size) 1024);
|
||||||
buildstate->graph = &buildstate->graphData;
|
buildstate->graph = &buildstate->graphData;
|
||||||
buildstate->ml = HnswGetMl(buildstate->m);
|
buildstate->ml = HnswGetMl(buildstate->m);
|
||||||
buildstate->maxLevel = HnswGetMaxLevel(buildstate->m);
|
buildstate->maxLevel = HnswGetMaxLevel(buildstate->m);
|
||||||
@@ -956,7 +956,7 @@ HnswBeginParallel(HnswBuildState * buildstate, bool isconcurrent, int request)
|
|||||||
/* Leave space for other objects in shared memory */
|
/* Leave space for other objects in shared memory */
|
||||||
/* Docker has a default limit of 64 MB for shm_size */
|
/* Docker has a default limit of 64 MB for shm_size */
|
||||||
/* which happens to be the default value of maintenance_work_mem */
|
/* which happens to be the default value of maintenance_work_mem */
|
||||||
esthnswarea = maintenance_work_mem * 1024L;
|
esthnswarea = maintenance_work_mem * (Size) 1024;
|
||||||
estother = 3 * 1024 * 1024;
|
estother = 3 * 1024 * 1024;
|
||||||
if (esthnswarea > estother)
|
if (esthnswarea > estother)
|
||||||
esthnswarea -= estother;
|
esthnswarea -= estother;
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ void
|
|||||||
IvfflatCheckMemoryUsage(Size totalSize)
|
IvfflatCheckMemoryUsage(Size totalSize)
|
||||||
{
|
{
|
||||||
/* Add one to error message to ceil */
|
/* Add one to error message to ceil */
|
||||||
if (totalSize > (Size) maintenance_work_mem * 1024L)
|
if (totalSize > maintenance_work_mem * (Size) 1024)
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
|
(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
|
||||||
errmsg("memory required is %zu MB, maintenance_work_mem is %d MB",
|
errmsg("memory required is %zu MB, maintenance_work_mem is %d MB",
|
||||||
|
|||||||
Reference in New Issue
Block a user