Fixed crash with shared_preload_libraries - fixes #460

This commit is contained in:
Andrew Kane
2024-02-14 17:13:30 -08:00
parent 22cb2a3fe7
commit 5ba62fca84
3 changed files with 8 additions and 2 deletions

View File

@@ -601,6 +601,9 @@ BuildCallback(Relation index, CALLBACK_ITEM_POINTER, Datum *values,
static void
InitGraph(HnswGraph * graph, char *base, long memoryTotal)
{
/* Initialize the lock tranche if needed */
HnswInitLockTranche();
HnswPtrStore(base, graph->head, (HnswElement) NULL);
HnswPtrStore(base, graph->entryPoint, (HnswElement) NULL);
graph->memoryUsed = 0;