Re: Get memory contexts of an arbitrary backend process
torikoshia <torikoshia@oss.nttdata.com>
From: torikoshia <torikoshia@oss.nttdata.com>
To: Kasahara Tatsuhito <kasahara.tatsuhito@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Fujii Masao <masao.fujii@oss.nttdata.com>,
Georgios Kokolatos <gkokolatos@protonmail.com>, PostgreSQL-development
<pgsql-hackers@postgresql.org>
Date: 2021-01-14T10:11:23Z
Lists: pgsql-hackers
Attachments
- v8-0001-Add-pg_get_target_backend_memory_contexts-to-coll.patch (text/x-diff) patch v8-0001
Since pg_get_target_backend_memory_contexts() waits to dump memory and it could lead dead lock as below. - session1 BEGIN; TRUNCATE t; - session2 BEGIN; TRUNCATE t; -- wait - session1 SELECT * FROM pg_get_target_backend_memory_contexts(<pid of session 2>); --wait Thanks for notifying me, Fujii-san. Attached v8 patch that prohibited calling the function inside transactions. Regards, -- Atsushi Torikoshi
Commits
-
Add function to log the memory contexts of specified backend process.
- 43620e328617 14.0 landed
-
Add pg_backend_memory_contexts system view.
- 3e98c0bafb28 14.0 cited
-
Limit the verbosity of memory context statistics dumps.
- 7b5ef8f2d070 9.6.0 cited