Re: Enhancing Memory Context Statistics Reporting
Fujii Masao <masao.fujii@oss.nttdata.com>
From: Fujii Masao <masao.fujii@oss.nttdata.com>
To: Rahila Syed <rahilasyed90@gmail.com>,
torikoshia <torikoshia@oss.nttdata.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2025-01-06T17:04:20Z
Lists: pgsql-hackers
On 2025/01/06 22:16, Rahila Syed wrote: > PFA the patch with above updates. Thanks for updating the patch! I like this feature. I tested this feature and encountered two issues: Issue 1: Error with pg_get_process_memory_contexts() When I used pg_get_process_memory_contexts() on the PID of a backend process that had just caused an error but hadn’t rolled back yet, the following error occurred: Session 1 (PID=70011): =# begin; =# select 1/0; ERROR: division by zero Session 2: =# select * from pg_get_process_memory_contexts(70011, false); Session 1 terminated with: ERROR: ResourceOwnerEnlarge called after release started FATAL: terminating connection because protocol synchronization was lost Issue 2: Segmentation Fault When I ran pg_get_process_memory_contexts() every 0.1 seconds using \watch command while running "make -j 4 installcheck-world", I encountered a segmentation fault: LOG: client backend (PID 97975) was terminated by signal 11: Segmentation fault: 11 DETAIL: Failed process was running: select infinite_recurse(); LOG: terminating any other active server processes Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Cross-check lists of built-in LWLock tranches.
- 2047ad068139 19 (unreleased) cited
-
Convert strncpy to strlcpy
- 45e7e8ca9e93 18.0 landed
-
Typo and doc fixups for memory context reporting
- f8c115a6cb65 18.0 landed
-
Add missing string terminator
- d2a1ed1727a8 18.0 landed
-
Rename argument in pg_get_process_memory_contexts().
- c57971034e69 18.0 landed
-
Add function to get memory context stats for processes
- 042a66291b04 18.0 landed