mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-14 08:36:54 +08:00
Improved memory usage logging [skip ci]
This commit is contained in:
@@ -267,9 +267,11 @@ FlushPages(HnswBuildState * buildstate)
|
|||||||
{
|
{
|
||||||
#ifdef HNSW_MEMORY
|
#ifdef HNSW_MEMORY
|
||||||
#if PG_VERSION_NUM >= 130000
|
#if PG_VERSION_NUM >= 130000
|
||||||
elog(INFO, "memory: %zu MB", MemoryContextMemAllocated(buildstate->graphCtx, false) / (1024 * 1024));
|
elog(INFO, "graph memory: %zu MB, total memory: %zu MB",
|
||||||
|
MemoryContextMemAllocated(buildstate->graphCtx, false) / (1024 * 1024),
|
||||||
|
MemoryContextMemAllocated(CurrentMemoryContext, true) / (1024 * 1024));
|
||||||
#else
|
#else
|
||||||
MemoryContextStats(buildstate->graphCtx);
|
MemoryContextStats(CurrentMemoryContext);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user