From 42cd4c6833b4233e9c6d53f0719dc1b7c1008542 Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Fri, 22 Dec 2023 12:49:07 -0500 Subject: [PATCH] Fixed call to GenerationContextCreate for Postgres < 15 --- src/hnswbuild.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/hnswbuild.c b/src/hnswbuild.c index c8e9bbc..17dbe65 100644 --- a/src/hnswbuild.c +++ b/src/hnswbuild.c @@ -492,7 +492,10 @@ InitBuildState(HnswBuildState * buildstate, Relation heap, Relation index, Index buildstate->graphCtx = GenerationContextCreate(CurrentMemoryContext, "Hnsw build graph context", - 1024 * 1024, 1024 * 1024, 1024 * 1024); +#if PG_VERSION_NUM >= 150000 + 1024 * 1024, 1024 * 1024, +#endif + 1024 * 1024); buildstate->tmpCtx = AllocSetContextCreate(CurrentMemoryContext, "Hnsw build temporary context", ALLOCSET_DEFAULT_SIZES);