Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit02b01e1

Browse files
committed
Show tuples with memory usage [skip ci]
1 parent388e42f commit02b01e1

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

‎src/hnswscan.c

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,17 @@ GetScanValue(IndexScanDesc scan)
102102
returnvalue;
103103
}
104104

105+
#if defined(HNSW_MEMORY)
106+
/*
107+
* Show memory usage
108+
*/
109+
staticvoid
110+
ShowMemoryUsage(HnswScanOpaqueso)
111+
{
112+
elog(INFO,"memory: %zu KB, tuples: "INT64_FORMAT,MemoryContextMemAllocated(so->tmpCtx, false) /1024,so->tuples);
113+
}
114+
#endif
115+
105116
/*
106117
* Prepare for an index scan
107118
*/
@@ -209,7 +220,7 @@ hnswgettuple(IndexScanDesc scan, ScanDirection dir)
209220
so->first= false;
210221

211222
#if defined(HNSW_MEMORY)
212-
elog(INFO,"memory: %zu KB",MemoryContextMemAllocated(so->tmpCtx, false) /1024);
223+
ShowMemoryUsage(so);
213224
#endif
214225
}
215226

@@ -271,7 +282,7 @@ hnswgettuple(IndexScanDesc scan, ScanDirection dir)
271282
UnlockPage(scan->indexRelation,HNSW_SCAN_LOCK,ShareLock);
272283

273284
#if defined(HNSW_MEMORY)
274-
elog(INFO,"memory: %zu KB",MemoryContextMemAllocated(so->tmpCtx, false) /1024);
285+
ShowMemoryUsage(so);
275286
#endif
276287
}
277288

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp